Go Down

Topic: Futaba SBUS reverse engineered to work with Arduino (Read 137632 times) previous topic - next topic

lorbass

#45
Dec 15, 2014, 10:23 am Last Edit: Dec 15, 2014, 10:25 am by lorbass
Errors during compilation

I have the same issues like m_marc() at #11 which where not answered.

And the following message with the example of the mentionned libray on github...
for the line:

 Serial<<sBus.channels[0]<<","<<sBus.channels[1]<<","<<sBus.channels[2]<<"\r\n";

invalid operands of types 'int' and 'const char[2]' to binary 'operator<<'


My target is to decode the Output from DJI Lightbridge which is only available as S-Bus Signal.
Therefore no other functions (camera, gimbals, landing gears) are possible.
And the Signal is too "week" to feed standard decoders on the market.
All I request to proceed are the values of the Tx/Rx Channels.

I think there is a lot of Brain behind the library for not to use it.
Thanks a lot for help


Erni

You could try this instead.
It dosn't use any librarys and it just works.

http://openrcforums.com/forum/viewtopic.php?f=84&t=6361

codeforge

Hi,
i try to  make a sbus signal to control a sbus controler. Could you give me an example to make it write instead of read from sbus?


dtsonchev

Hello
I have receiver FrSKY 4RSB connected SBUS to NAZA M V2.
By Arduino, I want to on/off a LED from  the remote control channel 9.
Can you help me?

Thanks


Erni


miodand4

Hi,

I am using Taranis and X8R to communicate with an arduino nano, and for some reason something is not working. (Note even the example from the library)


I built an inverter with a BC337 and two resistors, and I plugged it into the serial port, but nothing happens.
Maybe I need a pull-up resistor in the output of the inverter?

Thanks in advance!

Erni


This is the inverter I use.
Both resistors are 1k


mikesbaker

Hey everyone. I have made some big updates to the code. I have make a new sketch that autodetects betwen SBUS, DSM serial (10 or 11 bit), PPM and PWM. The code is a bit more readable now as well. It is set up to run on an arduino mega.

https://github.com/FunkyFlier/RC_sig_new_rc_type/

m0rph3us

#53
Jul 25, 2015, 01:06 am Last Edit: Jul 25, 2015, 01:08 am by m0rph3us
In order to get started, I am trying to replicate what Soler did with a Futaba R7008SB receiver.

I'm feeding +5V from the same Arduino Uno to a 74HC14 Hex Inverter but I'm still not getting any kind of signal being read in the program.  I've also tried the +3.3V port and still could not detect the correct output.

I verified that the serial port on my Arduino Uno is actually receiving data (looked at it through a program called XTCU) but I can't seem to trigger the "sBus.toChannels == 1" condition in the code.

What am I missing?



My code is:

Code: [Select]
#include "FUTABA_SBUS.h"
#include <Servo.h>

FUTABA_SBUS sBus;
Servo myservo;

void setup(){
  sBus.begin();
  Serial.begin(100000);
  Serial.println("Initialized!");
 
  pinMode(13, OUTPUT);    //LED
  digitalWrite(13, LOW);  //LED

  myservo.attach(3);       //attach a servo to pin 3
  myservo.writeMicroseconds(1500); //centered
}

void loop(){
  sBus.FeedLine();             
  if (sBus.toChannels == 1) {   
    digitalWrite(13, HIGH);
    delay(3000);
    sBus.UpdateServos();
    sBus.UpdateChannels();   
    sBus.toChannels = 0;      //why would this be updated???
   
    myservo.writeMicroseconds(1000);
}



I also tried Erni's code in post #31 with a 3.3V from the arduino (and 5V for the receiver from the same Arduino and still nothing)...any ideas...?

Degsky

Hi Guys,
first of all big thanks to mikesbaker for the great work!
I plan to port the code for a Tiva TM4C123GH6PM Microcontroller for my new Projekt.
And I have a stupid Question, perhaps you can help me:
I want to buy a receiver with S.Bus and read the Channels into the Microcontroller.
Do you know if the receiver put the Channel Information all the time on the S.Bus or do I have to "ask" the receiver over the S.Bus to put the Channel Information on the Bus?
If the receiver puts the Information unasked on the bus, do you know what's the time period between the publications?

Erni

Quote
Do you know if the receiver put the Channel Information all the time
The channel information is sent all the time, you don't need to ask.

Erni

@Degsky,

Using the below solution has the big advantage that the author mstrens is very active on the  openrcforum so you can ask him if you have any problems


http://openrcforums.com/forum/viewtopic.php?f=84&t=6361

Degsky


ardued

Hi, thanks for nice work on this code :)
I have tried the code, made transistor signal inverter and i read the values of ch 1-8.

Arduino ProMicro 16Mhz
Reciever = Futaba R6303SB
Transmitter = Futaba 10C

Any idea on why dont i get values from channel 9 and 10?
ch9 stays solid on value 1023
ch10 stays solid on value 0

Solution:
Well i found it so i leave this post here if someone else wonders.
In the libraryfile "FUTABA_SBUS.h" i removed "//" before #define ALL_CHANNELS
Now it works perfectly and prints all channels :)
Regards ardued

JuzARandomGuy

https://github.com/mikeshub/FUTABA_SBUS
Hi guys, Im making use of the code above to use in my project of receiving and transmitting sbus signals to pixhawk. I can get the received signal to be displayed on to the serial monitor but i can't get the arduino to output any signal to the pixhawk. Much help is appreciated.:)

Go Up