View Single Post
  #2   Spotlight this post!  
Unread 04-02-2006, 22:43
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Ball speed trap using 2005 RC

Quote:
Originally Posted by eugenebrooks
An interrupt/timer example that implements a ball speed trap using banner sensors can be found at:
www.srvhsrobotics.org/eugenebrooks/
in the file SpeedTrap2005.zip.

Teams might find this code useful in confirming that your ball shooter does not exceed 12 meters/sec. This code builds and runs on the 2004/2005 RC that you might have laying around from last year.

Many teams will have "narrow beam" banner sensors and reflective tape laying about around previous years as well and can quickly cobble a speed trap using these. Set up your banner sensors so that the digital inputs see a "1" when the light beam is clear of any obstruction. The sensor at the start of the speed trap is wired to digital input 01. The sensor at the end is wired to digital input 02. The code assumes a 19 inch separation between the beams, but you can adjust the calibration to any desired distance. The results are printed on the computer display with two digits behind the decimal point (truncated). The result is also shown on the user mode led display on the OI, in tenths of meters per second (rounded), making a selfcontained instrument without an attached computer possible.

Have fun,
Eugene
Hi Eugene,

We downloaded your code to our 2004 RC, and hooked up the banner sensors to digital inputs 1 and 2 (After making sure that the sensors were wired such that they read 1 when open.).

The only output we are receiving is from the call
Code:
printf("SpeedTrap2005, assuming a 19 inch light beam separation\r");
The only logical reason for this that I can find is that
Code:
if(GetSpeedTrapCycle() != SpeedTrapCycleCount)
is never evaluating to true. Can you think of any reasons for this?

Thanks,
__________________