jonny_ji7 e9e1df9ea1 Change/Add sw pulldown resistors, Fix MANUAL mode
Analog In only pins have no internal pullup resistors.
thus two preset switches need pulldown resistors on pcb to be soldered
and switch to 3v instead of GND
- changed in connection plan
- changed switch config in config.cpp (no pullup, inverted)

Fix manual mode:
previously there was a bugged change loop when pressing all 3 buttons
- made mode switch more clear
2022-08-20 10:08:36 +02:00

16 lines
956 B
C++

#include "config.hpp"
//--- inputs ---
//create and configure objects for evaluated switches
gpio_evaluatedSwitch SW_START(GPIO_SW_START, true, false); //pullup true, not inverted (switch to GND, internal pullup used)
gpio_evaluatedSwitch SW_RESET(GPIO_SW_RESET, true, false); //pullup true, not inverted (switch to GND, internal pullup used)
gpio_evaluatedSwitch SW_SET(GPIO_SW_SET, true, false); //pullup true, not inverted (switch to GND, internal pullup used)
gpio_evaluatedSwitch SW_PRESET1(GPIO_SW_PRESET1, true, false); //pullup true, not inverted (switch to GND, internal pullup used)
gpio_evaluatedSwitch SW_PRESET2(GPIO_SW_PRESET2, false, true); //pullup false, INVERTED (switch to 3V3, pulldown on pcb soldered)
gpio_evaluatedSwitch SW_PRESET3(GPIO_SW_PRESET3, false, true); //pullup false, INVERTED (switch to 3V3, pulldown on pcb soldered)
//create buzzer object with gap between queued events of 100ms
buzzer_t buzzer(GPIO_BUZZER, 100);