#include <cppgpio.hpp>
#include <thread>
int main(int argc, char **argv) {
health_server::setStatusHandler(mandeye::produceReport);
std::thread http_thread1(health_server::server_worker);
GPIO::DigitalOut out(21);
GPIO::PushButton in(20, GPIO::GPIO_PULL::UP);
in.f_pushed = [&](){
out.on();
std::this_thread::sleep_for(std::chrono::milliseconds (500));
out.off();
};
in.start();
// blink once to test GPIO21
in.f_pushed();
for (;;) {
}
return 0;
}
It is basic code that is to trigger blink of led on output GPIO21 when GPIO20 is connected to GND.
However, it is not working, raspi-gpio says it is still pulldown mode:
From my initial debbugging GPIOBase::pullupdown is not called.
I am opening issue since I do not know if I am experiencing a bug, or done smth wrong.
Kindly ask for assistance.
Repository state : 017564088be26b36cdfaa418becc62a7ed52da94
Static linking
Raspberry pi 4
Raspbian GNU/Linux 10 (buster)
Hi, foremost thank you for awesome work!
I have slight issue with button class.
It is basic code that is to trigger blink of led on output GPIO21 when GPIO20 is connected to GND. However, it is not working, raspi-gpio says it is still pulldown mode:
When I connect to GPIO21 3.3V the GPIO20 blinks.
From my initial debbugging
GPIOBase::pullupdown
is not called. I am opening issue since I do not know if I am experiencing a bug, or done smth wrong. Kindly ask for assistance.