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