- Robotic Dinosaur (Camarasaurus) - It is a pet
- Behavioral Based Robotics / Human Robot Interaction
- "A supercute baby dinosaur that begins its emotional and intellectual development when you pull it out of the box" - CC
- Learning behaviors, Case Based Reasoning etc.. High Level AI
- 37 sensors, 14 motors and 7 microcontrollers
- For this class, Pleo's will be controlled over their USB or Serial interfaces. The serial interface is made wireless by using 2 XBee Series 1 modules. You will need to study how the serial transmission works from the example code.
Pleo Kit contains…
- Egg Charger/Bat, Green Charger/Bat, Adapter
- 2 XBee's + 1 XBee Explorer
- 2 USB MiniA to MiniB converters
- SD Card + SD Card reader
- PDK (Pleo Development Kit) Update 01.26.2010
- Example Codes for Pleo. Find in PDK/examples/migio
- Example Codes for PC. Find in PDK/MiGIO
- Software and Drivers for XBee. Install FTDI drivers and XCTU. AVRTerminal. Find them in PDK/XBee
- Pleo/Pleo Monitor/PDK Documentation (See /docs in PDK)
- PAWN Reference Manual Quick Learn
- Serial communications in Win32
- XBee AT Commands
This lists the entire setup required to work with Pleo. You can follow all the steps in this order. All these instructions were tested on a Windows 7 machine. They should work with any Win32 machine.
For XBee programming,
- Install DXX FTDI drivers (PDK\XBee\CDM20600.exe)
- Install XCTU ((PDK\XBee\40002637_c.exe) and update it with these drivers (PDK\XBee\40002636_A.zip). To update, open XCTU -> Modem configuration -> Download New Versions -> File. Point it to the .zip file that you downloaded. XCTU will now be updated with the latest XBee drivers.
For Pleo programming,
- Optionally, Install Pleo serial drivers from PleoDevelopmentKit\tools\drivers. This is only required if you want to connect Pleo through USB. Plugin a MiniA to MiniB USB cable from the Pleo to your USB. When you are promoted for a device driver, use drivers from PDK\tools\drivers.
- Install Python (2.6 to be safe)
For the MiGIO interface,
- Nothing required. But download AVRTerminal for debugging.
- XBee is used to make the Serial RS232 interface wireless. Your laptop USB supports RS232.
- After you are finished installing the FTDI drivers, XCTU with its updates, plugin the XBee to your USB through the give USB MiniA to MiniB connector.
- Now, open XCTU. XCTU shows you any open COM port which the XBee is using. (If you did not see a COM port open, remove the XBee and try inserting again. Check your Device Manager for an open COM port. If no port was opened, your drivers did not install properly). Click on the open COM port.
- The default settings for a new XBee is 9600 baud, 8 bits, with 1 stop bit. But, we have programmed the XBee to work with 115200 baud. Try using Test/Query to connect to the XBee.
- If the test was successful, go to Modem configuration -> Read. This will show you the entire XBee settings. Your PAN ID should be unique and baud should be 115200 to make it work with the Pleo. If you need to reconfigure the XBee, set the ID, baud and click on 'Always Update Firmware'. Click Write to program the XBee.
- You can use the Terminal Tab to send and receive data over the serial port.
- Optionally, you can use AVR Terminal for sending and receiving message. In AVR Terminal, hit ReScan. It shows all the open COM ports. All the clickable ports are open. Set settings to baud rate 115200, 8 bits, 1 stop bit. Hit connect. If you reset your Pleo now, you should see the Pleo bootloader log on your Terminal.
- Unzip or Unrar the PleoDevelopmentKit.rar/.zip folder. This will have the code required to work with Pleo. Pleo uses the PAWN language.
- bin/ugobe_project_tool.exe is used to cross-compile the PAWN code to a .urf file. Find examples in examples/. Check out examples/migio. sensor.bat is used to compile the sensor.p code to sensor.urf. If you have a SD Card reader, the batch file also copies the compiled file into the SD Card.
- Read documentation/Pleo Programmers Guide.pdf and documentation/PleoAPI.chm to understand how to program Pleo's, cross-compile code and use it in the Pleo.
- Use Visual Studio 2008 from MSDNAA. Open the MiGIO/MiGIO.sln file to open the project. In the Configuration.h files uncomment #define PLEO and comment #define ROVIO. Set PLEO_PORT to a valid port.
- The serial code is in SerialTerm.* files. It uses Win32 libraries to talk over the serial port. To understand how they work read Serial communications in Win32. Use this code as a prototype to create your messages for sending and receiving commands, read sensor data etc…
- Ensure that your working COM port is between COM4 and COM9. If it is not, go to Device Manager->Ports(COM & LPT)->USB Serial Port->Right Click to Properties->Port Settings->Advanced. Change Serial COM Port and Apply.
How Stuff works!
There is one interface designed. Use it for prototyping. You will find it in examples/migio/sensors.p. For debugging, use the Pleo Monitor, check PDK\documentation\Pleo Monitor.pdf
- Use with MiGIO.
- The interface sends out byte-level messages instead of decimals. So, a move command looks like mZZZZZZZZZZZZZZ!. This sets all angles to zero. Each byte after m corresponds to an angle value. Each value is offset by 90 to avoid sending signed bytes. ! is used to mark the message end.
- Similarly, sensor messages are send back from Pleo as sZZZ[[[[[……..!.
- Bug: Currently, this can cause Pleo to trigger a communication shutdown. To solve this, disable the RX-TX warning for garbage bits on Pleo.
- To overcome this bug, we are using byte values from 32-125. The angle 0 degrees is byte(32+45), and the resolution of angle for every bit is 2 degrees. Hence, byte(32) = -90 degrees, byte(77) = 0 degrees and byte(32+90) = 90 degrees.
- We 'might' come up with a better fix…