Picaxe 28x1 Digital input and output programming help. :D
February 20, 2009
I got some digital line sensors. I am trying to do these steps:
Set the I/O line to an output and drive it high
Allow at least 10 us for the 10 nF capacitor to charge
Make the I/O line an input (high impedance)
Measure the time for the capacitor to discharge by waiting for the I/O line to go low
Here is my code currenly for testing.
high portc 0
low portc 0
high portc 1
low portc 1
debug ' this draws out all variables to the editor.
And I do not see anything changing in the debug panel. I have searched on this site and used the ping node for this start to the code. But I dont think I am changing it back to input before putting it to low. I am looking over the Picaxe BASIC manual and am unable to find what I am looking for. Please help.
Here is the link to the type of line sensors I have. I have 2 of them. http://www.pololu.com/catalog/product/959
I do have them connected correctly and have double checked that. And I am using pin0 and pin1 for the digital inputs. :D
Thanks for your help.