need help with code......
Lou
Posts: 3
·OK so im a little new to stamps,code and circuitry. I have been giving myself a crash course as of late so i have some knowledge base. I'm trying to make a toy tank. The idea is for the tank to sense the edge of a table using a ping ultrasonic rangefinder. I'm using a· basic stamp homework board, 2 continous rotation servos with a servo controller (all parallax).I have found examples of code for individual components but no examples of how to integrate all these into a single program. I know the get sonar sub routine for the senro, but how or should i say where do I put the servo commands? I just want it to sense the edge, back-up for 2 seconds and do a 180 deg. turn then repeat. Any help even an outline is appreciated!!
Comments
·· I would recommend reading the "What's A Microcontroller?" text, available as a free download from our website.· Please go to Books/Stamps In Class Curriculum.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Can also be found on the Parallax site.
edit: <oops wrote this at the same time as Jon >
·· If it's at the end of the barrel and aiming downward, it certainly will.· What you have to watch out for with any sonar sensor is that it's not trying to peek over the edge.· The PING))) sees in a cone shape, and so if it's mounted at the front of the tank looking downward and part of the tank is in it's FOV (Field Of View) you will get inconsistent readings.
·· What you propose should work fine as long as the PING))) is looking past the barrel.· I hope you understand what I am saying.· If not I will post a (crappy) graphic.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
mayday help
signed trying not to be code illiterate
Post Edited (Lou) : 4/13/2005 10:49:53 PM GMT
·· Using your example of mounting inside of a tube, here's what I mean about trying to avoid the signal hitting surfaces around the mounting area.· Yes it's a crappy drawing done in MS Paint!· · You'll have to experiment to find the best position for it as well...Protruding from the tube might even work better.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com