PilotWiings: Reality
Pilotwiings: Reality is my final project for Networked Objects. The goal of the project is to provide an alternate control mechanism for flying an indoor remote-controlled airplane using the accelerometers and buttons of a Wii remote. The wiimote connects to a computer over bluetooth, and its accelerometer values and buttons presses are captured by a custom Processing application (using the WRJ4P5 library) . This application then sends a series of digits as an encapsulated message to an Arduino over USB. The Arduino parses the message and flashes a series of IR emitters to control the plane.
Throttle is controlled by tilting the wiimote up and down, and turning is accomplished by rotating it let and right. Additionally, the wiimote button “A” cuts the throttle off, while the trigger button “B” bring the throttle to full. (To see a video of the UI of the Processing app in action, see my previous post.


The largest challenge by far has been hacking the Palm Z’s infrared control protocol. The Palm Z controller emits a series of pulsed IR light to communicate with the plane. By researching and talking to other R/C hackers, I determined that the Palm Z uses a 17-bit “message” comprised of the following:
Message Format: SS ChCh ThThTh RuRuRu TrTr ChkChkChkChk St
SS = Start Bit
Ch = Channel declaration
Th = Throttle value (0 - 15)
Ru = Rudder value = (0 - 7)
Tr = Rudder trim value
Chk = Checksum
St = Stop Bit
Example:
“SS001110000001110” = Channel A, Full Throttle, No Rudder/Trim
There are three “channels” defined by a 175, 130, 100ms delay between each “message”. However, I was unable to determine the exact timing for each bit value. For example, the developer I spoke to claimed that a “true” bit was represented by the IR emitter being on for 7ms and off 6ms, and a “false” bit was represented by the IR emitter being on for 13ms and off for 11ms. However, when I attempted to measure the values myself, I found this to definitely not be the case. Unfortunately, when I used an oscilloscope I was unable to determine the exact timings myself (they tended to vary across messages), so I will need to do more research to get it to work. This may include contacting the manufacturer.
I ran into issues getting the Arudino to flash the IR emitter with the proper timings. I would often find that the IR emitters would either flash too quickly or slowly for the desired bit. This may be alleviated by optimizing the code.

