Control an S107G RC helicopter with an Arduino board.
- Four 940nm infrared LEDs
- One 2.2 Ohm resistor
- Breadboard
- Arduino
If you have a different number of LEDs, you may want to use this LED calculator tool. To increase the range of this circuit, you will either need more LEDs or brighter LEDs, which will draw more current from the Arduino's pin. In such case, consider using a transistor to drive the LEDs' power.
Upload S107G_Controller.ino
to your Arduino and open the Serial Monitor
. Turn on your
helicopter and control its throttle, yaw, pitch, or trim by sending the following commands:
t:X
: set throttle toX
- any integer between 0 and 127, for examplet:50
y:X
: set yaw toX
- any integer between 0 and 127, centered at 63p:X
: set pitch toX
- any integer between 0 and 127, centered at 63r:X
: set trim toX
- any integer between 0 and 127, centered at 63
Upload S107G_PyController.ino
to your Arduino and run
S107G_PyController.py
on your computer. Control the helicopter with your keyboard.
- The serial interface between the Arduino and the computer is too slow to maneuver the helicopter
The code in this repository is based on the work of several people, including that of Jim'ung, ladyada, and Kerry D. Wong. Credits to all of them for reverse engineering the controller protocol and showing how to send a 38KHz infrarred pulse using an Arduino.
Some of the sources on which I based my work are:
- Syma S107 Arduino Driver and Python GUI Controller
- jimhung.co.uk's S107G protocol
- Reverse Engineering the Syma S107G IR Protocol
- Making an Intervalometer
The protocol to control the RC helicopter can be found here. Note that this code works for the 2-channel version, if you have a 3-channel remote controller follow this link.