Illustration: at a wooden garden table, hands hold an RC transmitter; on the table are an Arduino Mega, a receiver and a servo.Radio control
Illustration (made with AI): roughly what the finished project looks like.

Control an Arduino with a FlySky Transmitter

The FS-iA6B receiver passes every channel of the transmitter to the Arduino over a single wire (i-BUS). That way the transmitter can drive servos, lights or your own robot.

Difficulty
Intermediate
Time
1 h
Age
12+
Parts
6, 6 on the site

Written by the RoboHub team. A question? Write to us.

Variations

Choose a variation and the parts list updates.

Instructions

  1. Bind the receiver

    Bind the receiver to the transmitter as usual: BIND jumper, power, BIND KEY on the transmitter.

  2. Set up the transmitter

    Turn on the i-BUS output in the FS-i6X menu: System → RX Setup → Output mode → i-BUS.

  3. Wiring

    Connect the signal of the receiver's i-BUS (SERVO) port to the Mega's RX1 pin (19), power to 5V and ground to ground. On an Uno R3 the only serial port is taken by USB, so use a Mega here: the code is written for it.

    RX1 is the Mega's pin 19. The servo is on pin 9, as in the code (servo.attach(9)). D9 is the board's digital pin 9, GND is ground. Red wires are power, black ground, the other colours signals (on a real servo the ground wire is often brown). In the steps, what a step adds is in colour and what is already connected in grey.

    • FS-iA6B, i-BUS SIG → Arduino Mega RX1
    • FS-iA6B, i-BUS + → Arduino Mega 5V
    • FS-iA6B, i-BUS − → Arduino Mega GND
    • SG90 servo SIG → Arduino Mega D9
    • SG90 servo + → Arduino Mega 5V
    • SG90 servo − → Arduino Mega GND
  4. Upload the code

    Install the IBusBM library.

    Arduino C++
    #include <IBusBM.h>
    #include <Servo.h>
    
    IBusBM ibus;
    Servo servo;
    
    void setup() {
      ibus.begin(Serial1);                 // receiver i-BUS -> Mega RX1 (19)
      servo.attach(9);
    }
    
    void loop() {
      int ch1 = ibus.readChannel(0);       // 1000-2000 us
      if (ch1 >= 1000) servo.writeMicroseconds(ch1);
      delay(20);
    }
  5. Try it

    Move the first channel's stick and the servo follows.

    Illustration: an RC transmitter, a receiver, an Arduino Mega and a servo.

    Illustration, made with AI

  • Robotics
    Beginner30 min10+

    Control a Servo with a Knob

    Turning a potentiometer swings a servo from 0 to 180 degrees. This is how a robot arm, or any other moving part, works.

    5/5 parts on the site
  • Sensors
    Beginner1 h10+

    Parking Sensor with Sound and Lights

    An ultrasonic sensor measures the distance. Three LEDs show how close the obstacle is, and the buzzer beeps faster the closer you get.

    6/6 parts on the site
  • Home and IoT
    Beginner1 h10+

    A Smart Bin

    Bring your hand close and the lid lifts by itself. An ultrasonic sensor notices the hand, and a servo opens the lid and closes it three seconds after the hand has gone.

    5/5 parts on the site
1 part to the cart
255 ₾