Step 4: Program the Robot

Original Link : http://www.societyofrobots.com/step_by_step_robot_step4.shtml

 

Notes and Modifications

Follow all the software related stuff ( installing , etc.) One major thing to note is that you CANNOT use PonyProg to program your Roboduino. However you can use the AVR MKII ( aka ISP2) Programmer detailed on that page AND you can even use no hardware programmer at all and use the Roboduino's built-in bootloader! Using a bootloader means you just plug in the Roboduino's USB cable and program the Roboduino through its own USB port, no extra programmer needed.

Also , since the Roboduino uses the ATmega168 we have to modify the original $50 Robot code. The modified code lets you have 16 times the processor speed as the original $50 Robot code. Please note that this code is ONLY for the Roboduino. Just download code that I already modified for you - its attached at the bottom of this page.

 

6 Pin ISP Programmer

Just connect the ISP programmer's USB cable to your computer and auto-install the drivers (Windows XP downloads and installs it automatically). Then plug in the 6 pin ISP cable into the Roboduino , making sure that the arrow on the ISP connector matches up with the arrow on the Roboduino board.

 

 

Now in AVRstudio you just press the Build button -

 

 

Once the build is successful

Press the program button -

 

A program window should pop up. Select the MKII Programmer and then another window should open up.

 

All the fuses were already set for you when the Roboduino was made so you don't have to worry about fuses. In the main tab make sure that it says ATmega168.

Now click the Program tab and verify that the Input Hex File is your Photovore Hex File. Now press program and everything is done.

 

 

Unplug the ISP connector and your robot is ready to go.

 

Bootloader

To be written soon