Vex and the XBee radio


#1

I’ve been experimenting with XBee radios and the VEX platform this year, I had a couple ideas in mind, one to provide an alternative method for logging data from the Robot to a PC. I would like the ability to log the debug stream directly to a disk file to be able to ingest in a spreadsheet, vs. having to select copy & paste the output in the debug stream. A couple years ago we had code that would record sensor values like ‘stop motion’ video, and then we were able to ‘print’ the output to a file for use in our autonomous routines. Eventually we got smarter and had the output print code which we could directly copy and paste into the robot source code as the team completed a ‘routine’ That effort was done in Easy C which provided a means to save the debug output file directly to disk file. Since switching to Robot C I’ve missed the log output to disk capability so I decided to investigate alternatives. The Vex Firewiki site provided inspiration an a ready example:

http://www.robotc.net/firewiki/index.php?title=Main_Page

I also invested in an Arduino and the book building wireless sensor networks.

https://www.sparkfun.com/products/10324

With hopes to ultimately create a alternative joystick control for my old PIC robot brain. I embarked on the adventure to interface the XBee radios to the Cortex and the Arduino. I’ve learned a lot though I have a long way to go. I thought I’d share something easy which is the logging functionality.
With an XBee explorer
https://www.sparkfun.com/products/8687
and the XBee regulated output board,
[https://www.sparkfun.com/products/9132
it was fairly easy to connect an X Bee to the Cortex (and hopefully to the PIC). As it turns out the 4 wire connectors for the Integrated motor encoders align with the XBee regulated output board pin outs to make it very simple to plug the XBee explorer into the Cortex serial port.

So here is the first of several (hopefully) examples based upon using these wonderful devices to interface with the Cortex & later the PIC.

Cheers Kb
P.S. thanks to CMU & James Pearman for inspiration and help on this project.](https://www.sparkfun.com/products/9132)
XbeeSerialInterfaceLibraryStrings.zip (3.82 KB)