Skip to content

Comments

add support for the esp8266's single serial port#50

Open
agustinbene wants to merge 1 commit intobmellink:masterfrom
agustinbene:esp8266-compatibility
Open

add support for the esp8266's single serial port#50
agustinbene wants to merge 1 commit intobmellink:masterfrom
agustinbene:esp8266-compatibility

Conversation

@agustinbene
Copy link

Description of Changes

Feature Added: ESP8266 Hardware Serial Port Compatibility

This update modifies the library to support the ESP8266's single hardware UART port.

Test Environment

Transmitter: FlySky FS-i6 (original firmware)
Receiver: FS-iA6B

Connections:

  • GND to GND
  • 5V to 5V
  • iBus (Sens) to Rx (ESP8266)
  • Rx (ESP8266) to TX (ESP8266) with a diode

Test Code

#include <IBusBM.h>

IBusBM IBus; 

void setup() {
  IBus.begin(Serial);
  IBus.addSensor(IBUSS_RPM);
  IBus.addSensor(IBUSS_TEMP);
}

#define TEMPBASE 400    // base value for 0'C

// sensor values
uint16_t speed = 0;
uint16_t temp = TEMPBASE + 200; // start at 20'C

void loop() {
  IBus.setSensorMeasurement(1, speed);
  speed += 10;                // increase motor speed by 10 RPM
  IBus.setSensorMeasurement(2, temp++); // increase temperature by 0.1 'C every loop
  delay(500);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant