Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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