Iam trying to use all the channels in the RC radio to turn on LED's when moving each channel stick up and down. I can not make the if statements to work past the first one. I only have 1 channel here but can not seem to get it to work so I can add the rest. I am new to programming and have trouble with all the Curley brackets.
IF you use Google to search for "arduino pulseln", you will quickly find this:
" The length of the pulse (in microseconds) or 0 if no pulse started before the timeout. Data type: unsigned long..
That is not a float, so there is no reason to compare the return value to a float.
Paul
I am not having any trouble with reading the PWM signals from the receiver. I am having trouble with using more than one of the if statements
Thank You
That is exactly why I asked why your "if" statements contain float values when the return from pulsln() is an unsigned long, NOT a float. Fix that and perhaps your "if" will work better.
Paul
I finally got the programing to work for the first channel. Hope I can get the other channels.
If there is a better way to make this work I wood Shure like the help.
Thank You MainRCradio2.ino (592 Bytes)