Progressing slowly these days, Sebi made quite few steps forward on his own. Starting with that Dual Shock 2 integration, he bought Turnigy TGY-iA6B V2 Receiver 6CH 2.4G AFHDS 2A Telemetry Receiver w/SBUS from Hobby King in expectation to extend control range significantly.

It took it more than a month to arrive, but Sebi couldn’t resist to mount it:

The other cable’s ended up in Arduino MEGA’s sensor shield.

And of course huge thanks to Simon for donating his Turnigy TGY-i6 Mode 2 AFHDS Transmitter and 6CH Receiver.

Sebi kept coding whole day and while being pretty desperate time to time he ended up with having it done! His code follows (all just Sebi!!).
// Needs to have PPM-reader installed: it works on avr arduinos
#include <PPMReader.h>
#include <Servo.h>
// Initialize a PPMReader on digital pin 3 with 6 expected channels.
int channelAmount = 6;
PPMReader ppm(3, channelAmount);
// Declaring some basic variables.
int channel; //channel index
int value; //value variable
int bufferValues[6]; //memory buffer
int values[6]; //value memory
int minValue = 1000; //minValue option
//Starting up the servo objects
Servo thrusters;
Servo vectors;
void setup() {
Serial.begin(115200);
thrusters.attach(4);
vectors.attach(7);
}
void loop() {
// I use a 'loop' because 'for' doesn't comply sometimes
channel = 1;
while (channel <= channelAmount) {
int value = ppm.latestValidChannelValue(channel, 0); //saves value
// this operation simple reverts the value back if it crosses the min
if (value < minValue) {
value = bufferValues[channel];
} else {
// and saves it otherwise
bufferValues[channel] = value;
}
// then that is all put over an extra layer of security
if (value < minValue) {
value = 1000;
}
// here I utilise the map function to condition the channels
if (channel != 5 and channel != 6) {
value = map(value, 1100, 1990, 1000, 2000);
}
values[channel] = value;
Serial.print(String(value) + "\t");
channel++;
}
// this operation asks whether the switch is on
if (values[6] > 1500) {
thrusters.writeMicroseconds(values[3]);
vectors.writeMicroseconds(values[4]);
} else {
thrusters.writeMicroseconds(1000);
vectors.writeMicroseconds(1500);
}
Serial.println();
// here is the servo update delay
delay(20);
}
Sebi also prepared a short demo on how it works.
Well done Sebi!
Next step – move it from Arduino to our BBBlue. 😉
Sebík je špatně slyšet, kameramane polepši se 😀