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
3
Buttons
Ks0466VoltLadder::voltageToButton
(uint16_t voltage)
const
{
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
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
Ks0466VoltLadder.h
Ks0466VoltLadder::voltageToButton
Buttons voltageToButton(uint16_t voltage) const
Definition
Ks0466VoltLadder.cpp:3
src
input
Ks0466VoltLadder.cpp
Generated by
1.12.0