Usually, there are two flavors of Sumo robot competition:
- Autonomous: no communication to the robot permitted after the start.
- Remote-controlled: there is a wireless remote controller driving the robot.
Just for fun, I have implemented a wireless remote controller application for my Zumo Robot using the Freescale SRB (MC13123) board. I’m using the Freescale MMA7260Q accelerometer on the SRB board to control the robot.
Messages are sent between the wireless network nodes using the RNet wireless communication stack. The SRB board measurees the X, Y and Z acceleration and sends it to the robot. The robot uses the values to change the desired speed values of the PID controller on the robot.
Sending the accelerometer values is using the RNet API:
uint8_t buf; int16_t x, y, z; /* send periodically accelerometer messages */ ACCEL_GetValues(&x, &y, &z); buf = (uint8_t)(x&0xFF); buf = (uint8_t)(x>>8); buf = (uint8_t)(y&0xFF); buf = (uint8_t)(y>>8); buf = (uint8_t)(z&0xFF); buf = (uint8_t)(z>>8); (void)RAPP_SendPayloadDataBlock(buf, sizeof(buf), RAPP_MSG_TYPE_ACCEL, RNETA_GetDestAddr());
That’s it 🙂
Here is a video how this looks like:
Still a bit rough, and could use some fine tuning. One issue was that the A/D conversion of the SRB board is heavily affected by the battery/supply voltage which I need to compensate for.
As for the coming Sumo battle event scheduled for Friday, 13-Dec-2013, we will have a mixed rule: robots will be both autonomous and with remote controller help. Will be fun to see who plays best :mrgreen:.
Happy Controlling 🙂