RGB Swarm Robot Quickstart Guide

From Mech
(Difference between revisions)
Jump to: navigation, search
(Programming the e-puck)

Revision as of 15:25, 8 September 2009


This guide was written as a quickstart guide for the Swarm Robots Project, but contains general information about programming e-pucks.


  • Physical Set up
    • Projector
    • Tent
  • Computer Programs needed

Computer Setup

  • Download this
  • Set up that


e-puck Setup

Preparing the code

  • if you have the HEX file, skip down
  • compiling
  • getting HEX file

Connecting the e-puck

  1. Go to start menu >> control panel >> Bluetooth Devices
  2. Click the 'Add...' button in the lower left of the dialog window
    • Turn on the e-puck that you wish to configure/connect to the computer
    • Check the box next to 'My device is set up and ready to be found.'
    • Continue with the Next button, and the computer will search for your e-puck
  3. Once the computer finds your e-puck, select the appropriate e-puck (should be ID'd by the 4 digit ID number), and assign the 4 digit ID number as the 'passkey' for that e-puck
    • This process reserves a pair of COM(serial) port for that specific e-puck, one as Incoming and the other as Outgoing; each e-puck will have a different pair of ports
  4. Return to the Bluetooth Devices Dialog screen, and click on the COM Ports tab
  5. Check which COM ports are assigned to your e-puck, specifically the Outgoing COM port; this COM port will be used when programming this e-puck with the TinyBootloader program
  • Note: if using a USB Bluetooth dongle, when the dongle is unplugged and replugged it into a different USB port, or a different dongle altogether is used, it may be necessary to repeat these steps for each e-puck that you wish to use

Programming the e-puck

Taken from: Swarm E-puck Quickstart Guide: Programming the e-puck

A bootloader is a type of program that is loaded onto a microcontroller which allows one to re-program the microcontroller in the field without having to use an special flash programmer (the programmer is still needed to load the bootloader onto the microcontroller in the first place). The Bootloader has two components: a programmer that runs on your computer, and a program that runs on the e-puck's PIC. When the PIC is turned on, bootloader will check to see if someone is attempting to re-program the PIC; if yes, the bootloader will overwrite its old program with the new program; if not, or if it times out while waiting for the new data stream, it will simply run the current program.

To program the e-puck, start the Tiny Bootloader program on your computer. (Although you can also use a flash programmer such as the ICD2 to program the e-puck, it will take much longer and can't be done wirelessly.) Click on Browse and select the .hex file that you want to load. The .hex file is the compiled code from Microchip's C compiler. Under Comm, use 115200 for the baud rate, and type in the outgoing COM port assigned to this e-puck (e.g. COM10, COM11, etc.). Turn on the e-puck, and click on the Write Flash button. The blue bar underneath the button should start counting down. Now, hit the blue reset button on the e-puck, before the blue bar reaches zero and times out. If the e-puck is successfully connected, an orange LED on the e-puck will turn on, and the bootloader will start to program the PIC on the e-puck.

e-puck Troubleshooting

Machine Vision Localization System

  • Machine Vision Localization System Code

Machine Vision Localization System Setup

Vision System Troubleshooting

Additional Tools

Matlab Tools

Visual Studio Tools

Personal tools