I have a (S107G) mini helicopter, and an Arduino. The possibilities sounded quite fun. So I set off to find the protocol for the transfer of data from controller to helicopter with IR. I used this code to try to figure out something of it.
void setup()
{
Serial.begin(9600);
pinMode(12, INPUT_PULLUP); // 12 is IR sensor
}
void loop()
{
Serial.print(digitalRead(12) ? LOW : HIGH);
delay(1);
}
Obviously there a number of flaws with this.
delay(1);
is arbitrarily chosen, I have no way of knowing at what speed data is transmitted.- It could be an analog input. (Though I doubt it, as most IR sensors I found don't support that)
- I have no way of knowing when a "packet" starts or ends.
If any of you have an idea of how to do this I would much appreciate it. Thanks!
EDIT: I found this on SO and it sounds very nice, but he didn't go into depth as to how he did it, and what his findings were (speed, etc.)