Hi All,
Rookie here.
I'm trying to read PPM signals from a Hitec or Futaba TX via the PPM pin, then display it through the serial port, channel by channel, then visually display it in a .net application. It works like a charm, but my issue is that the numbers coming off either TX (Hitex/Futaba) the numbers are always "twitching", not consistent.
#define channumber 9
int value[channumber];
void setup()
{
Serial.begin(115200);
pinMode(2, INPUT);
}
void loop()
{
while(pulseIn(2, LOW) < 5000){}
for(int x=0; x<=channumber-1; x++)
{
value[x]=pulseIn(2, LOW);
}
for(int x=0; x<=channumber-1; x++)
{
Serial.print("|");
Serial.print(value[x]);
value[x]=0;
}
Serial.println(" ");
}
Is there a way to somehow filter it so the numbers remain more consistent? It is a bit of an issue because I'm trying to send the numbers through an RF module to another arduino which in turn translates the numbers into servo commands, but because of this, the servos are always moving, or humming a bit.
Thanx