Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
bmellink committed Mar 18, 2019
1 parent 6043a97 commit 4d9152e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Arduino RC IBus protocol handler
Arduino library for RC iBUS protocol - servo (receive) and sensors/telemetry (send) using hardware UART.
Arduino library for Flysky/Turnigy RC iBUS protocol - servo (receive) and sensors/telemetry (send) using hardware UART.

The iBUS protocol is a half-duplex protocol developed by Flysky to control multiple servos and motors using a single digital line. The values received for each servo channel are between 1000 (hex eE8) and 2000 (hex 7D0) with neutral sub trim setting, which corresponds with the pulse width in microseconds for most servos.

Expand All @@ -26,7 +26,11 @@ You have three options:
- If you plan to **only provide sensor** iBUS data from your sketch, you will need to connect the iBUS sensor pin to both the RX and TX pin of the allocated UART. You need to include a diode (such as 1N4148) between the Arduino TX pin and the wire between the iBUS pin and the Arduino RX pin (cathode/solid ring of diode connected at Arduino TX pin) to handle the half-duplex protocol over the single iBUS wire.
- If you plan to **use both servo output and sensor data** in your sketch, your should use two different UART ports on your Arduino board.

For more information on the iBUS protocol, see (https://github.com/betaflight/betaflight/wiki/Single-wire-FlySky-(IBus)-telemetry).
For more information on the iBUS protocol, see (https://github.com/betaflight/betaflight/wiki/Single-wire-FlySky-(IBus)-telemetry). (please skip over the first part of the article how to combine the servo output and sensor data pins of the TGY receiver as it is more reliable to use two different UART ports on your Arduino if you need both servo and sensor data in your sketch).

### Example wiring

![Wiring with MEGA 2560](wiring.png?raw=true "Wiring with MEGA 2560")

### Example code for servo output only

Expand Down
4 changes: 2 additions & 2 deletions examples/Ibus_singlemonitor/Ibus_singlemonitor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
such as the Flysky FS-iA8X (from specs, not tested yet). The TGY-IA6C also has
one iBUS pin but only supports servo control signals and does not support external telemetry sensors.
Requires Arduino board with multiple UARTs (such as ATMEGA 2560)
- serial0 - monitor output (debug output to PC)
Requires Arduino board with multiple UARTs (such as ATMEGA 2560 or Micro)
- serial0 - monitor output (debug output to PC, this is through the build-in USB)
- serial1 - connected to the ibus receiver pin
Hardware connections to setup/test if you have a receiver with 1 ibus pins:
Expand Down
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name=IBusBM
version=1.0.0
author=Bart Mellink
maintainer=Bart Mellink
sentence=Arduino library for RC iBUS protocol - servo (receive) and sensors/telemetry (send) using hardware UART
paragraph=With this library you can interface to any RC receiver (such as TGY-IA6B) that supports the iBUS protocol. iBUS uses an asynchronous protocol format at 115200 baud. The library requires at least one free hardware UART (serial) port. The library can be used to receive data (typically servo data) and send data (telemetry or sensors).
sentence=Arduino library for the Flysky/Turnigy RC iBUS protocol - servo (receive) and sensors/telemetry (send) using hardware UART
paragraph=With this library you can interface to any RC receiver (such as TGY-IA6B) that supports the Flysky iBUS protocol. Flysky iBUS uses a half-duplex asynchronous protocol format at 115200 baud. The library requires at least one free hardware UART (serial) port. The library can be used to receive data (typically servo data) and send data (telemetry or sensors).
category=Communication
url=https://github.com/bmellink/IBusBM
architectures=avr
Expand Down
Binary file added wiring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4d9152e

Please sign in to comment.