 |
…and then the cRIO was phased out in favor of the roboRIO, the new and improved robot controller (also from National Instruments). Only slightly bitter, we realized that the roboRIO actually made our lives much easier. Since the roboRIO ran Linux, it was much more open to development. Because of this, we were able to create a Linux daemon (a program that runs continuously in the background) to translate our ChapR packets. This program would be entirely independent of any user code, and therefore wouldn’t have to be written in the three different languages that FRC teams use. Also, it would live on the roboRIO itself, so it would only have to be installed once.
Problem was, the roboRIO didn’t have the same RS232 Serial port that the cRIO had had. Our good ‘ole FireFly wouldn’t do the job. So, like any good engineers would do, we just added some sketchy wires and tried to get it to work anyway. As you can see in the pictures, it was not pretty. We abandoned that effort pretty quickly, settling on using the USB port of the roboRIO instead. We then found out that the beta release of the roboRIO code (which we luckily got to work with as beta testers for team 2468) wouldn’t allow us to access the USB ports. So, we jumped on the beta forums and politely asked for them to be opened.
Turns out, our little request made it into the release code at the very last second! With the USB ports now opened, we purchased our very own Bluetooth-to-USB-to-Serial converter, which turned out to be helpfully named the FirePlug (also from GridConnect of course). With all of the infrastructure in place, we set about decoding the new packet structure. Poor (or crazy) Rachel spent about a week with WireShark and a couple of controllers, mapping each byte to a value, as well determining the various modes and whatnot. This meticulous, yet enjoyable work can be seen in the spreadsheets at left. With everything in place, we coded up our second take at FRC compatibility. The new code worked beautifully, so we went to a local National Instruments employee to just double check on a couple of points.
|