First off, thanks again for all the help I’ve gotten from the TinyCLR community over the last week or so, in preparing for the talk Pete Brown and I gave at CMAP Code Camp. The talk was well-attended and we got some great feedback.
One of the demos I did was using the IR receiver and IR LED eBlocks to capture and transmit IR codes, based on the code here:
but instead of controlling a TV, I used it to control a remote control helicopter.
I’ve also modified the same code to work with the RoboSapien v2 robot, which uses IR for remote control (the only change needed was to change the carrier frequency from 38000 to 39200).
What I’m looking for opinions on is how to build on this example to create a more full-featured command application for either the helicopter, the RoboSapien, or both.
In the case of the RoboSapien, the commands seem to be generally shorter than the buffer that’s set up on the program to record the IR commands, so in theory I could simply enhance the current program to be able to store multiple distinct codes (to the SD card, perhaps), and have the application load the stored codes on startup, and provide some means (perhaps via the touch screen on my FEZ Spider kit) to play them back individually.
In the case of the helicopter, however, the IR remote sends a signal continuously, as long as the control sticks are engaged. This means that simply capturing and replaying the commands isn’t possible in the same way that I can do with the RoboSapien. I know, however, that if I capture part of the streamed commands the helicopter WILL fly.
So here’s the question…would it make more sense to attempt to capture some representative snippets of the helicopter commands, and hope that I can piece them together in such a way as to keep it flying, or would it be worth trying to analyze the recorded data to see if I can suss out the protocol that is being used for the commands (i.e. - what does it look like to add more power for going higher, what does a turn command look like, etc.)?
My background is not in E.E., so I’d be doing this very much from a newbie standpoint, so on the face of it, recording a bunch of commands and trying to piece them together into a flight plan seems more likely to succeed, but analyzing the data for the actual protocol seems like the “right” way of doing it, assuming there’s any reasonable chance of success.
Would love to hear what my fellow Gadgeteers and geeks think.
PS - My boys (who are 4 and 8) totally approved of the command I recorded and played back with my Gadgeteer kit, which was the one that made the RoboSapien burp. Amazing how even simulated bodily functions can amuse little boys (OK, I confess, I laughed too).