Is there a way to edit the stamp code for commands???
Ok, I am trying to measure the·"time elapsed"·by a laser. Its for obstacle detection. I am confused as to what should be the stamp programming·and·the setup of the·circuits.
I read that the "RCTIME" command (256 of manual) has a similiar relation for to the equation I want to use to calculate the time elapsed:·distance traveled = speed of light * time elapsed. But, can I open the command code in stamp and edit it then save as a new command? Can I swap the resistor and capacitor component for the reciever and speed of light?... I dont know the substition second part or any of it... Do you know how to do this?
By the way, could this even work? When I picture this in my mind I see: a low wavelength laser shoots a light beam, the light hits the object and comes back, the PNP detector receives the signal (can the PNP detector recieve laser light too??) or a photoresistor receives the light, then the circuitry will be similiar to the Basic Stamp Manual v.2.0's figure 5.29a under RCTIME, then I will modify the command to interchange resistance with speed of light & the capacitance is substituted with time elapsed... ?
I got the laser and detector part a tiny bit figured out, but I don't know how the approach after the photoresistor part. I don't know how to get the time elapsed vaule until it hits the photoresitor by using stamp nor do I know how to build the circuitry for this. Or am I in the completely wrong direction???... and yes... I waited until the last minute... HAAAAALLP!!!
I read that the "RCTIME" command (256 of manual) has a similiar relation for to the equation I want to use to calculate the time elapsed:·distance traveled = speed of light * time elapsed. But, can I open the command code in stamp and edit it then save as a new command? Can I swap the resistor and capacitor component for the reciever and speed of light?... I dont know the substition second part or any of it... Do you know how to do this?
By the way, could this even work? When I picture this in my mind I see: a low wavelength laser shoots a light beam, the light hits the object and comes back, the PNP detector receives the signal (can the PNP detector recieve laser light too??) or a photoresistor receives the light, then the circuitry will be similiar to the Basic Stamp Manual v.2.0's figure 5.29a under RCTIME, then I will modify the command to interchange resistance with speed of light & the capacitance is substituted with time elapsed... ?
I got the laser and detector part a tiny bit figured out, but I don't know how the approach after the photoresistor part. I don't know how to get the time elapsed vaule until it hits the photoresitor by using stamp nor do I know how to build the circuitry for this. Or am I in the completely wrong direction???... and yes... I waited until the last minute... HAAAAALLP!!!
Comments
The PING))) detector will detect obstacles, and give you the distance between itself and whatever it's pointing at. They also have code samples to use this device (including the Stamp). The PING))) detector can even be had at some RadioShack stores, so you can obtain it right away. This should suit your needs.
I'm sorry to say that the·configuration you're proposing will not work. Not because your concept of distance=rate*time is wrong, but because it's not practical. Laser light travels at ~299,792,458 m/s (according to google). That's 670,616,629 mph. So light will travel over 1 meter in about 3.3 nanoseconds. There's no way a Basic Stamp will be able to time the laser light travel - it just isn't fast enough. By comparison, a microcontroller like an SX running at 50MHz (which is really, really fast for a microcontroller) has an execution time of 20 nanoseconds per instruction.
Do note that GPS systems use your approach to figure out the distance between the GPS receiver and a GPS satellite (which is very, very far), but with radio waves instead of light (technically radio waves and light are the same thing - electromagnetic waves). Even then, they use atomic clocks to time the distance traveled by a radio wave.
Post Edited (InSilico) : 2/18/2009 1:14:00 PM GMT
Ok, I understand. This PING detector looks interesting. For what I am trying to accomplish, you think I need to purchase the sample kit of the PING)))·or get any additional parts or will the product·from your link be enough (I am not trying to make the system to·pan or move or anything.) p.s. I only have the Board of Education RevB kit.
I was hoping they had some additional resource and downloadable information to read up on. Thanks. Ok, no additional parts *whew*... Thanks so much Mike! This has been a life-saver...
Jax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If a robot has a screw then it must be romoved and hacked into..
Do most of your Radio Shacks carry these? In my area, there's one RS that has a nice little stock of Parallax stuff, and the rest have none at all. Needless to say, I'm a regular at the one that does. I was profoundly shocked to see a RS that was actually _increasing_ its supply of useful electronics parts (they're also the one place that always has the blank PC boards I need).
Jax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If a robot has a screw then it must be romoved and hacked into..