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
3
Buttons
Ks0256VoltLadder::voltageToButton
(uint16_t voltage)
const
{
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
Buttons
Possible button values.
Definition
Buttons.h:5
Buttons::RIGHT
@ RIGHT
Buttons::SELECT
@ SELECT
Buttons::LEFT
@ LEFT
Buttons::NONE
@ NONE
Buttons::DOWN
@ DOWN
Buttons::UP
@ UP
Ks0256VoltLadder.h
Ks0256VoltLadder::voltageToButton
Buttons voltageToButton(uint16_t voltage) const
Definition
Ks0256VoltLadder.cpp:3
src
input
Ks0256VoltLadder.cpp
Generated by
1.12.0