Radio Shack Mobile Robot manual Programs, Test Program TEST.BS2, Wander Program WANDER.BS2

Page 30

Programs

The ARobot package includes programs to:

￿￿ Test Program to test motors, buttons, whiskers, speaker, LEDs, etc.

￿￿ Steering adjustment program to set the straight position of the steering motor.

￿￿ Wander program will move around avoiding obstacles.

Other programs and projects for ARobot are available at our website:

www.robotics.com/arobot

Test Program: TEST.BS2

The test program tests all functions on ARobot. When it powers up, it beeps several times to test the speaker. The program then responds to the following inputs:

Whiskers:

One whisker makes it beep once and turns on the green LED.

 

The other whisker beeps twice and turns on the red LED.

Buttons:

One button toggles the LEDs on and off and sends data out the

 

serial port (counts from 1 to 25). The other button

 

moves all RC servo motors from left to right and back again.

Jumpers:

One jumper causes the drive motor to move forward.

 

The red LED will go on and off as the motor turns indicating an operating encoder.

 

The other jumper turns on the powerful output.

 

If one button is pressed, the powerful output will reverse polarity.

Steering Adjustment Program: STRAIGHT.BS2

This program helps the robot builder adjust the steering system for straightness. The program will wait for the user to push one of the buttons. Once the button is pushed, the robot straightens the steering wheels, beeps once, moves forward 10 feet, then reverse 10 feet. Adjust the steering arms and check the robot’s travel until straight.

Wander Program: WANDER.BS2

This program is a simple object detection/avoidance routine. It drives forward until a whisker comes in contact with an object. It then reverses direction and steers away from the object. After a short period, it returns to straight forward movement. The Wander program is an excellent starting point for the crea- tion of new programs.

27

Image 30
Contents Assembly and User Guide ARobot Mobile Robot Connectors Introduction About ARobotBasic Stamp II Control Computer Feature List What You’ll NeedTechnical Specifications Precautions Component Locator ControllerGlossary of Terms Glossary of Terms Glossary of Terms Assembly Overview Parts Quantity Description Used ForAbout Screw, nut, and washer sizes Parts Motor Brackets Paint Primer PaintingSanding Finish CoatWhiskers SummaryHow it Works Whisker Detail Full Scale Whisker Wire Pattern Drive Motor and Brackets Encoder Sensor Front Wheel Assembly Steering Motor and Rear Wheels Steering Motor Mounting Wheel and Axle Steering System Controller Board Battery Pack Don’t install batteries yetSummary Don’t install batteries yet Body Cable Finishing Up Basic Stamp II Installation About the Controller BoardProgramming USB Port Cable to your PCPC Editor/Downloader Software Programming NoteTest Program TEST.BS2 Steering Adjustment Program STRAIGHT.BS2Programs Wander Program WANDER.BS2About the Controller Board Power On/Off Switch Reset ButtonBatteries LED indicators SpeakerPush Buttons and Jumpers switches Drive Motor and EncoderSteering Motor Coprocessor Command Summary Example !1M11200E7RC Servo Motor and Steering Motor Control Coprocessor Communication RulesHexadecimal, Binary, Bytes, Words, etc Serial Port J12 Battery Connector J9Body Connector J8 PinoutPowerful Connector J11 RC Servo Motor Connectors J2-J5Drive Motor Connector J10 Voltage 12 volts Maximum Current 500ma PinoutExpansion Connector J1 Expansion Port RC Servo Motor SignalsExpansion Port Circuit Examples Digital Inputs Switch Input ExampleDigital/Power Output Sensor Input ExampleAnalog Inputs Basic Stamp II light sensor example codeCoprocessor Network Expansion CommunicationsUsing Other Controllers Using ARobot’s controller as a coprocessorCabling between ARobot’s controller and another controller Suggested Reading Component Suppliers Stock Drive Products Sava IndustriesSmall Parts SuperCircuitsInternet Robot Resources Web SitesInternet News Groups Newsgroup NameDescriptionTroubleshooting Warranty Information Arrick RoboticsRobotics.com