 | Contact: B. Dean Pershall
(505) 346-7737
ST247
|
|  |
ATE Home | Engineering Program | Electronics Technology | Natural Resources | Geospatial Information Technologies
Advanced Quick Start Instructions:
This is intended for someone familiar with robotics. Newcomers to robotics
should refer to Lesson 1.0 first for more detailed instructions and further teaching.
- Install the Software
- Place RoadRunner CD into your drive.
- Go to My Computer, right click the RoadRunner CD and select explore.
- Click Javelin Stamp IDE Installer.
- When the Install Shield Wizard opens, click the next button
- Select Typical and click next.
- Install the program and click finish.
- Open folder, C drive > Program Files > Parallax Inc > Javelin
Stamp IDE > Projects. Leave this folder open by minimizing it.
- In My Computer, right click the RoadRunner CD and select explore.
- Open the Folder named Programs and Classes.
- Press ctrl + A to select all the files and folders, then press ctrl + C
to copy all files and folders.
- Now reopen the Projects folder and press ctrl + V to paste all files and
folders to this location.
- Prepare RoadRunner Board for communication
- Connect the 9.6V power supply to the power jack.
- Switch the power ON. The LED should light up.
- Run the Javelin Stamp editor by double-clicking on the shortcut on the
desktop.
- Connect the serial cable to your RoadRunner board.
- To make sure your Javelin Stamp is communicating with your computer, click
the Run menu, then select Identify.
- Your identification window should show a Javelin Stamp has been detected
on one of your computer’s COM ports. You can now turn off the power.
- Write and Run the Program
- Type the following object avoidance program in your Javelin IDE.
import lobot.progs.libs.Motors2;
import lobot.progs.libs.Analog;
// Gives access to MotorControl, IRADC, and RobotTransControl
/*
Port0 => Left
Port1 => Center
Port2 => Right
*/
public class obj_avoid
{
/*
static Port_2 IRController;
static MotorControl_3 MController;
*/
public static void main()
{
int diff,i;
while(true)
{
if (Analog.In(1) < 65 && Analog.In(2)< 95 && Analog.In(0)< 95)
//nothing in front
{
Motors2.speed(510,510);
}
else if (Analog.In(0)<=Analog.In(2))
{
Motors2.speed(510,-510);
}
else
{
Motors2.speed(-510,510);
}
}//End While
}
}
- Fix any compilation errors then save your work by clicking file and selecting
Save.
- Save as the name obj_avoid. This name must match the class name to function.
- Turn the power to the RoadRunner ON.
- Prop the RoadRunner so its wheels are not touching the ground.
- In the Javelin Stamp IDE, click the Run menu and select Run.
- Wait while the program is downloaded to the Javelin Stamp.
- When complete set the RoadRunner on the floor, and watch it go!
Note: The previous code as well as many others are located in Program Files
> Parallax Inc > Javelin Stamp > Projects > Lobot > Progs >
Program Examples. Some of these source codes may require different sensors
not included with your RoadRunner Help with Java programming can be found
in the included Javelin Stamp manual. Refer to the included schematic of the
RoadRunner board for i / o operations.
|  |