mikeshub / futaba_sbus Goto Github PK
View Code? Open in Web Editor NEWSBUS driver for arduino
SBUS driver for arduino
I believe that there is an issue with this part of code, on line 90 or 91 in FUTABA_SBUS.cpp. I think this is preventing Ch 9 onwards from output in the s.bus stream
` // store servo data
for (i=0; i<176; i++) {
if (servos[ch] & (1<<bit_in_servo)) {
sbusData[byte_in_sbus] |= (1<<bit_in_sbus);
}
bit_in_sbus++;
bit_in_servo++;
if (bit_in_sbus == 8) {
bit_in_sbus =0;
byte_in_sbus++;
}
if (bit_in_servo == 11) {
bit_in_servo =0;
ch++;
}
}`
Hey- Thanks a ton for creating this library. I am trying to connect my Futaba SBUS receiver to my Arduino Uno (I also have a Mega so have tried troubleshooting with that too). No matter what I do, I can’t get any readings to display on my OLED screen. I am using an I2C OLED screen to try to show the channel readings because I realize that the UNO only has 1 serial port, so it wouldn’t be feasible to view the channel outputs in a serial window if RX0 is tied up with the SBUS inputs.
I have followed the instructions and am just trying to adapt the example code to read out the first 4 channels to an Adafruit OLED screen but I am just getting 0’s. I am using a Futaba 10J transmitter with an R3008SB S.BUS receiver. I have confirmed that the SBUS channel of the receiver is indeed giving an output (I tested it with an S.BUS to PWM decoder and the channels worked as expected).
I am using a TTL inverter that uses a 2N3904 transistor a 10k and 4.7k resistor. Do you think there is any issue with using this type of transistor for the TTL inverter?
Any suggestions would be amazing!
Thanks
Can you add some documentation on how to use this? Mostly if it needs an inverter, which Arduino pins it needs to be connected to, etc.
Hello, I tried to read frames from this driver in another SBUS receiver (Arduino with https://github.com/zendes/SBUS.git).
There was only wrong frames on side of receiver.
I have realized... in your library is small mistake.
It is important to set correct format of serial communication...
SBUS needs even parity and two stop bits.
You have
port.begin(BAUDRATE);
You should have
port.begin(BAUDRATE, SERIAL_8E2);
Then it works.
By the way... very nice work, thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.