Race timer
arend
Posts: 4
I need help with the code for this project.
Its Pinewood Derby time. I want to do the following:
-Set a control switch at the top of the track
-Set photo sensors under the track at the bottom (for 4 - 6 lanes)
-Set up either a LCD and standard digit segment
The Cars pass over the photo sensors.
There will be a digit segmant display over each track to display (1st 2, 3, etc)
There will be a LCD in the center that will read out the speed for each track
There will be a reset and recall button for the speed.
It will be able to upload each race's speed
I have a Basic Stamp Home Work Board (with a serial port)
Any Ideas on coding this. (I am new to the langueage but familiar with java and C++ and basic bread boarding)
Thank you very much for your help.
Also if you have any sugestions of a better sensor to use for judging when the cars pass over the finish line I'm open to suggestions.
Its Pinewood Derby time. I want to do the following:
-Set a control switch at the top of the track
-Set photo sensors under the track at the bottom (for 4 - 6 lanes)
-Set up either a LCD and standard digit segment
The Cars pass over the photo sensors.
There will be a digit segmant display over each track to display (1st 2, 3, etc)
There will be a LCD in the center that will read out the speed for each track
There will be a reset and recall button for the speed.
It will be able to upload each race's speed
I have a Basic Stamp Home Work Board (with a serial port)
Any Ideas on coding this. (I am new to the langueage but familiar with java and C++ and basic bread boarding)
Thank you very much for your help.
Also if you have any sugestions of a better sensor to use for judging when the cars pass over the finish line I'm open to suggestions.
Comments
Welcome to the forum! It's been a half century since my pinewood derby days, so you'll have to bear with me. What, time-wise, is the average length of a race? To what degree of accuracy do you need to measure the time? Or is it good enough just to know the order of finish?
Regarding the photo sensors: Is it safe to assume that the winner is determined by which car breaks an imaginary plane across the finish line first, regardless of which part of the car it is? Or is their another criterion? Are you planning to use reflective sensors or transmissive sensors?
-Phil
-Phil
-Phil
Addendum:
I was going to mention a clock chip, like the DS1302, but its resolution is one full second, and reading out the time for one car could interfere with detecting the finish of another if they're at all close.
-When the race starts the triger calls a {start coup up} function that turns on the stop watch.
-As each car pases the finish line each indiviual sensor calls a {end time} function that reads the current time on the counter and stores the value.
-After all four sensors have called their function an {end race} function is trigered that calls the display function and shows the results.
Can the BASIC stamp handle this code if I use a counter like the one in a stop watch or in IC555 timer?
Here is another option:
http://www.parallax.com/dl/docs/cols/nv/vol8/col/nv141.pdf
I built it, bit never used it. I'll give it to you if you think it is suitable.