Shop OBEX P1 Docs P2 Docs Learn Events
Trying to modify the Forward100Pulses.bs2 program for the sumobot — Parallax Forums

Trying to modify the Forward100Pulses.bs2 program for the sumobot

fullmetal 25fullmetal 25 Posts: 1
edited 2011-05-03 17:52 in Robotics
I am doing the project listed in chapter 2 of the Applied Robotics with the Sumobot manual which is project number 1. This project involves using the techniques from activity #5 in ch. 2 to make an adjustable version of Forward100Pulses.bs2 from ch. 1, activity #1. I have to make it where I can select between 6 different distances ranging from 100 to 500 in steps of 100 and infinite loop mode. I'm not sure what infinite loop mode is and I'm trying to figure out how to combine these two programs into a workable one. If anyone can help me with this it would be most appreciated.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-05-03 17:52
    You need to read "Robotics with the BoeBot Robot" and "What's a Microcontroller?" to get an idea of how servos work. You can download them from Parallax or buy a printed version or look in the Stamp Editor's help files. There are also Wikipedia articles explaining R/C Servos that should help. Generally, servos require control pulses about 50 times a second and these pulses typically are between 1ms and 2ms in width. For these "continuous motion" servos, 1.5ms holds the servo motionless. 1.0ms moves the servo in one direction and 2ms moves the servo in the other direction with the difference in width between 1.5 and the actual pulse representing the speed. The larger the number of pulses, the longer the servo moves and the further it goes. I'm sure "infinite loop mode" refers to the Stamp producing control pulses indefinitely so the robot continues to move.

    "What's a Microcontroller?" goes into some detail about the FOR / NEXT statements which are what you need to use to produce specific numbers of servo control pulses. First get a program that can move your robot different distances. By then it should be pretty clear how to combine several different movements in one program.

    Remember that "help" here means pointing you to appropriate tutorials and examples so you'll learn how to do what you need. You have to do the work. It's not hard. If you work through the exercises in "What's a Microcontroller?", you'll have learned much of what you'll need to program the Stamp.
Sign In or Register to comment.