-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
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
Read operation toggles GPIO port value to 0 during read operation. #16
Comments
Hey @ravimindstix. It sounds like you want to set the direction to |
Hey Rakesh, I tried all the possibilities it still turn the value of port to 0. export port, set direction , read port , close . this way it generates the if you do gpio-admin export read port and close port, it works fine. and in your library in open function you set the direction and read I guess it will be good if after open we have an option to call set i guess the bug is in gpio-admin module. Thanks & Regards On Mon, Apr 21, 2014 at 6:42 PM, Rakesh Pai [email protected]:
|
Also having this issue, every time I gpio.read I need to be inside of gpio.write like so..
or have a Either way I still end up broken as
This all seems a lot messier than |
I had the same problem while driving a relay board. Try to put a (pull down) resistor between the pin and the ground. Begin at 1KOhm and go lower. This can't do any harm so just try it ;-) Hope this helps you. I've spend much much time until I solve this... |
While using the library i found out that the read operation toggles the high value of gpio port to low. I looked further in the issue, it seems that when we want only read operation , we open the port but this sets the direction to OUT by default. This causes the automatic toggle of gpio port value from 1 to 0 . I tested the issue with gpio-admin commands and when i just export the port and read the value and close port, it works fine. The moment i set the direction after exporting and try to read to the gpio port value, it changes the value of the port to 0 somehow.
The issue occurs when we try to read the port with value high or 1. It doesn't affect ports with value already 0.
The text was updated successfully, but these errors were encountered: