Pi edge detection
Posted: Wed May 22, 2013 9:24 pm
I think I am missing something here...
From what I can gather the following should work, but catting value is not blocking and I seem to get a random 0 or 1 even though I have said I am only interested on a rising edge and I have nothing connected to the pin so should be 0 all the time.
# echo "18" > export
# cd gpio18
# echo "rising" > edge
# cat value
1
# cat value
0
Anyone have any idea what I am doing wrong?
Thanks
Steve
From what I can gather the following should work, but catting value is not blocking and I seem to get a random 0 or 1 even though I have said I am only interested on a rising edge and I have nothing connected to the pin so should be 0 all the time.
# echo "18" > export
# cd gpio18
# echo "rising" > edge
# cat value
1
# cat value
0
Anyone have any idea what I am doing wrong?
Thanks
Steve