You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include<cppgpio.hpp>
#include<thread>intmain(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 (;;) {
}
return0;
}
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)
The text was updated successfully, but these errors were encountered:
michalpelka
changed the title
Raspberry pi4, pullup is not effective.
Raspberry pi4, pullup seems to be not effective.
Feb 12, 2023
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.
The text was updated successfully, but these errors were encountered: