RGB Swarm Robot Quickstart Guide
This guide was written as a quickstart guide for the RGB Swarm Robot Project, but contains general information about programming e-pucks and using the vision system.
- Physical Set up
- Computer Programs needed
- Download this
- Set up that
- RGB_Swarm_Puck_Code_working_version.zip This is the RGB Swarm code for the e-puck; install via directions below
Preparing the code
- if you have the HEX file, skip down
- getting HEX file
Connecting the e-puck
- Go to start menu >> control panel >> Bluetooth Devices
- 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
- 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
- Return to the Bluetooth Devices Dialog screen, and click on the COM Ports tab
- 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
- Note: these instructions are for using Windows XP Professional Edition. The exact command paths and dialog boxes may differ from OS to OS
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.
Machine Vision Localization System
- Machine Vision Localization System Code