diff --git a/README.md b/README.md index 22d5884..1ccca9a 100644 --- a/README.md +++ b/README.md @@ -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); diff --git a/examples/Ibus_sensor/Ibus_sensor.ino b/examples/Ibus_sensor/Ibus_sensor.ino index b29a5bb..71b3906 100644 --- a/examples/Ibus_sensor/Ibus_sensor.ino +++ b/examples/Ibus_sensor/Ibus_sensor.ino @@ -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); diff --git a/library.properties b/library.properties index 1ed7857..4662d75 100644 --- a/library.properties +++ b/library.properties @@ -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 diff --git a/src/IBusBM.cpp b/src/IBusBM.cpp index 27e87de..06e4bd5 100644 --- a/src/IBusBM.cpp +++ b/src/IBusBM.cpp @@ -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