We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inGPIO.waitForEdge()
Hi, I am trying to poll the GPIO pins and slightly modified the chp06/gpio/tests/test_syspoll.cpp as follows:
chp06/gpio/tests/test_syspoll.cpp
#include<iostream> #include<unistd.h> #include"GPIO.h" using namespace exploringBB; using namespace std; int main(){ GPIO outGPIO(44), inGPIO(45); inGPIO.setDirection(INPUT); //button is an input outGPIO.setDirection(OUTPUT); //LED is an output for(int i=0;i<100;i++) { outGPIO.setValue(HIGH); usleep(10); outGPIO.setValue(LOW); cout<< endl <<"toggle done"; // poll the echo pin to go high inGPIO.setEdgeType(FALLING); //wait for rising edge inGPIO.waitForEdge(); //will wait forever cout<< endl <<"checkpoint"; usleep(1000*100); } return 0; }
I am unable to debug this problem
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I am trying to poll the GPIO pins and slightly modified the
chp06/gpio/tests/test_syspoll.cpp
as follows:I am unable to debug this problem
The text was updated successfully, but these errors were encountered: