View Single Post
  #12   Spotlight this post!  
Unread 10-04-2010, 20:23
Azores's Avatar
Azores Azores is offline
Registered User
AKA: Andrew
FRC #3161 (Tronic Titans)
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Toronto, Ontario
Posts: 40
Azores has a spectacular aura aboutAzores has a spectacular aura aboutAzores has a spectacular aura about
Re: IR Beam Breaking Circuit

Rather than using a breakbeam sensor, we rigged up an IR rangefinder instead. The voltage it returns increases as an object moves closer to the rangefinder. So with it mounted in a fixed position in our frame, there's a baseline value that the voltage is steady at when there is no ball in position. When a ball enters the frame perimeter, the voltage spikes up (well alright, it increases by less than half a volt ). So the code just compares the reading every cycle to the reading taken upon initialization and when it increases enough, alerts the driver that a ball is in place through the dashboard (still getting this to work), or allows the bot to know when to kick in autonomous.
__________________
3161 Software Mentor + Photographer