well, like part of my arduino UAVS project, i wrote a program to read (not write) PPM signals coming from a RC receirver or maybe from the remote control port (buddy port), works with futabas and walkeras.
To know more about PPM signals pleaseeeeee here:
http://www.mp.ttu.ee/risto/rc/electronics/radio/signal.htm
If you want to intercept the PPM signal from you receiver, please enter here:
http://paparazzi.enac.fr/wiki/index.php/Other_Hardware
To know more about the buddy port of the futaba PLEASE HERE:
http://users.belgacom.net/TX2TX/tx2tx/english/tx2txgb3.htm
You just conect the PPM signal out to the pin 4 of arduino and arduino ground with the ground of the device.
#define channumber 6 //Cuantos canales tiene tu radio???????/How many channels have your radio???
int channel[channumber]; //Valores de canales leidos/ readed Channel values
int PPMin = 4;
void setup()
{
Serial.begin(9600); //Iniciamos com serial/
pinMode(PPMin, INPUT); //Patita 4 como entrada / Pin 4 as input
}
void loop()
{
//Espera hasta que la senal de sincronizacion llegue, debe ser > 4 milisegundos
//waits ultil synchronize arrives > 4 miliseconds
if(pulseIn(PPMin , HIGH) > 4000); //Si el pulso del pin 4 es > que 4 msegundos continua /If pulse > 4 miliseconds, continues
{
for(int i = 1; i <= channumber; i++) //lee los pulsos de los demas canales / Read the pulses of the remainig channels
{
channel[i-1]=pulseIn(PPMin, HIGH);
}
for(int i = 1; i <= channumber; i++) //Imprime los valores de todos los canales / Prints all the values readed
{
Serial.print("CH"); //Canal/Channel
Serial.print(i); // Numero del canal / Channel number
Serial.print(": "); // que te importa
Serial.println(channel[i-1]); // Imprime el valor/ Print the value
}
delay(200);//Le da tiempo para imprimir los valores en el puerto/ Give time to print values.
}
}
Right now im finishing my new invent:
Im writing an arduino code that is able to control 6 or more servos in parallel mode. What this mean?
Ok in normal mode, you need to pulse servo 1, then continue, pulse servo 2, then pulse servo 3, etc. etc. One by time.
But with my code you can control more than 6 servo just with one "pulse". YEAHHH. how i do it? well... is easy, with a "For" cicle, with a 1 microsencond delay, and when the X channel rich the pulse length, they LOW the port with an IF condition (if(pulseLenght >= parallelPulse) { digitalWrite(pinServo, LOW)}. THAT ALLL!!! haha ![]()
Another taste of my project, im waiting for my gyrocope sensor, to finish mi accelerometer+gyros+Kalman Filters, IMU.
...
To do this:
http://tom.pycke.be/mav/92/kalman-demo-application