View Single Post
  #3   Spotlight this post!  
Unread 21-03-2010, 17:32
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Swapping digital input/output

Quote:
Originally Posted by ay2b View Post
I just thought of this:

Maybe the Ultrasonic class, two I/O pins and a diode would solve the problem: Charge the cap through a diode from an output pin. This corresponds to the "ping" in the Ultrasonic class. When the output pin goes low, the diode prevents the cap from being discharged by the output pin, and the input pin can be used to measure the discharge rate.

Thoughts?
Sounds like you are on the right track to me. Personally, I'd use a FET instead of a diode to eliminate the .6V, but it likely doesn't matter.

Out of curiosity, what sensor are you using? Datasheet link please!
Reply With Quote