Skip to content

Commit

Permalink
ESP32 support
Browse files Browse the repository at this point in the history
  • Loading branch information
bmellink committed Apr 8, 2019
1 parent 0347bc3 commit 674d1dd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ The IBusBM class exposes the following functions:
```
- void begin(HardwareSerial& serial, int8_t timerid=0, int8_t rxPin=-1, int8_t txPin=-1);
```
This initializes the library for a given serial port. rxPin and txPin can be specified for the serial ports 1 and 2 of ESP32 architectures (default to RX1=9, TX1=10, RX2=16, TX2=17). Serial port 0 and ports on AVR boards can not be overruled. The variable timerid specifies the timer used (ESP32 only) to drive the background processing (see below). A value of IBUSBM_NOTIMER disables the timer interrupt and you should call loop() yourself.
This initializes the library for a given serial port. rxPin and txPin can be specified for the serial ports 1 and 2 of ESP32 architectures (default to RX1=9, TX1=10, RX2=16, TX2=17). Serial port 0 and ports on AVR boards can not be overruled (pins on ESP32 are RX0=3, TX0=1). The variable timerid specifies the timer used (ESP32 only) to drive the background processing (see below). A value of IBUSBM_NOTIMER disables the timer interrupt and you should call loop() yourself.

```
uint8_t addSensor(uint8_t type);
Expand Down
2 changes: 1 addition & 1 deletion examples/Ibus_sensor/Ibus_sensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void setup() {

// iBUS connected to serial1
IBus.begin(Serial1);
// The default RX/TX pins for Serial1 on ESP32 boards are pins 9/10 and they are often not
// The default RX/TX pins for Serial1 on ESP32 boards are pins 9/10 and they are sometimes not
// exposed on the printed circuit board. You can use Serial2 (for which the pins are often available) or
// you can change the pin number by replacing the line above with:
// IBusServo.begin(Serial1, 1, 21, 22);
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name=IBusBM
version=1.1.0
author=Bart Mellink
maintainer=Bart Mellink
sentence=Arduino library for the Flysky/Turnigy RC iBUS protocol - servo (receive) and sensors/telemetry (send) using hardware UART
sentence=Arduino library for the Flysky/Turnigy RC iBUS protocol - servo (receive) and sensors/telemetry (send) using hardware UART (AVR and ESP32 architectures)
paragraph=With this library you can interface to any RC receiver that supports the Flysky iBUS protocol (such as TGY-IA6B). 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
Expand Down
1 change: 1 addition & 0 deletions src/IBusBM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void IBusBM::begin(HardwareSerial& serial, int8_t timerid, int8_t rxPin, int8_t
IBusBMfirst = this;
}

// called from timer interrupt or mannually by user (if IBUSBM_NOTIMER set in begin())
void IBusBM::loop(void) {

// if we have multiple instances of IBusBM, we (recursively) call the other instances loop() function
Expand Down

0 comments on commit 674d1dd

Please sign in to comment.