Humidistat
Arduino firmware for a humidistat (humidity controller)
Loading...
Searching...
No Matches
Ks0466VoltLadder.cpp
Go to the documentation of this file.
1#include "Ks0466VoltLadder.h"
2
4 if (voltage > 1000) return Buttons::NONE;
5 if (voltage < 75) return Buttons::LEFT;
6 if (voltage < 250) return Buttons::UP;
7 if (voltage < 425) return Buttons::DOWN;
8 if (voltage < 625) return Buttons::RIGHT;
9 if (voltage < 875) return Buttons::SELECT;
10
11 return Buttons::NONE;
12}
Buttons
Possible button values.
Definition Buttons.h:5
Buttons voltageToButton(uint16_t voltage) const