can the BASIC Stamp control a servo, until a certain input comes along?
Matthew
Posts: 200
For example, can a BASIC Stamp hold a servo at 90 degrees, until a temperature probe tells the Stamp it is 50 degrees F? Would this be considered multitasking?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
New Combo LCD Backpack
http://hometown.aol.com/newzed/index.html
·
Check your temp probe and shorten the 20ms pulse to 19ms.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
New Combo LCD Backpack
http://hometown.aol.com/newzed/index.html
·
Here's a quote from the Parallax Servo Controller description:
"Luckily for you and your Parallax microcontroller, the PSC manages all of the servo pulses which enables your BASIC Stamp® module or Javelin Stamp module to take care of more important aspects of the application. "
Does that mean I can tell the stamp to drive a motor foward or reverse until it the distance is 40 feet? For example, the ultrasonic sensor would be constantly measuring distance, and when it is >40 feet, the motor will go in reverse intil 40 feet is acquired. And when the distance is <40 feet, the motor will go foward until 40 feet is acquired. Any thoughts?
Thanks.
You provide a pulse and the built-in pot provides a pulse (indicating the position of the servo).
Then the circuit in the servo "sees" which pulse is longer, (indicating if the servo is too far to the left or right.
The "difference" pulse is then "stretched" to about 20ms.
As long as you send a pulse every 20milliseconds or so the servo will hold it's position.
If you don't send a pulse in 20milliseconds the servo goes idle. Which means you can manually move it.
Hope this helps.
Bean.
You could potentially go certain distances if you know the speed of the continuous rotation servo because the BASIC Stamp can then control the time the Parallax Servo Controller runs.· See Robotics with the Boe-Bot, Chapter 4, Activity 2 for a distance vs. time example.· It doesn't use a coprocessor, but it's not hard to adapt.· Robotics with the Boe-Bot is available for free download from the www.parallax.com -> Downloads -> Stamps in Class Tutorials page.
Another option would be to use the range finder, and program the BASIC Stamp to determine when it has traveled 40 ft by subtracting the current distance measurement from the distance stored before the robot started moving.·
A third option would be to use encoders.· Enter Boe-Bot Digital Encoder into the Search field on the Parallax home page to find out more.
Post Edited (Andy Lindsay) : 11/4/2004 1:00:16 AM GMT