Hello,
I am working on a project and currently only have access to Futaba Sbus Servos. For those of you unfamiliar with these servos, their control signals are different from normal signals and therefore I cannot control them with the default servo library or analog output.
I found the following guide on the forums that has a library to decode the Sbus signal, but unfortunately I haven't been able to get it to work. When I hook up a oscilloscope to our Arduino's output, I can see that we are outputting some sort of signal at the correct frequency, but the servos still don't budge. I have included our code below, any pointers would be greatly appreciated! Btw we are using an Arduino Uno.
Servos: Futaba BLS157HV Servo Specifications and Reviews
Guide: Futaba SBUS reverse engineered to work with Arduino - Exhibition / Gallery - Arduino Forum
#include <FUTABA_SBUS.h>
#include <TimerOne.h>
FUTABA_SBUS myServo;
int i = 0;
int j = 0;
void setup() {
pinMode(13, OUTPUT);
myServo.begin();
Timer1.initialize(14*1000); // 14 ms
Timer1.attachInterrupt(setServoFlag);
}
void setServoFlag() {
myServo.toChannels = 1;
}
void loop() {
// toggle position of servo every 100 * 14 ms
if (i >= 100) {
i = 0;
j ^= 1;
digitalWrite(13, j); // blink LED
}
if (j == 0) {
myServo.Servo(0, 500);
} else {
myServo.Servo(0, 1500);
}
//myServo.FeedLine();
if (myServo.toChannels == 1){
i++;
myServo.UpdateServos();
myServo.UpdateChannels();
myServo.toChannels = 0;
}
}