Hello, guys. Sorry for my english, i learn it not very well at this moment. Also, sorry, if i posted this topic in a wrong section. So, i have kind'a dumb question, maybe. I need to read an incoming PWM signal. This signal come from quadcopter controller. I have tryed to find an information about this question, but found info only about output PWM from arduino. So, guys, please, can you tell smth about arduino incoming PWM. Or can you give a link to related article. I'm a little confused, because arduino have a digital inputs and analog inputs, but PWM is not a digital signal, there is no TRUE or FALSE, and it's not an analog input, because we have only 5 volts and 0 volts. Or i'm just stupid, and don't understand something?
Have a look at some of DuaneB's solutions.
Oh, DuaneB has a lot of stuff. Could you point to something more specific, if to you not difficultly. it's hard for me to understand all this articles. At my Spektrum i have a button. I want to control a camera with this button, but a receiver operate with PWM, not with a logic "YES" or "NOT". I found a IR-control library for my camera, but i have no information about PWM control from reciever to arduino. This is my situation, i hope, that somebody already solved similar problem. But i cant find info about it on russian community :(
I think i found smth, that i needed. http://www.arduino.cc/en/Reference/PulseIn, thanks you AWOL, that oyu said about duaneB - one hour of searching, a i found it
I have managed to use Duane's code, together with GPS to make an autonomous vehicle navigate to a waypoint. It was very smooth and easy to understand his code before I got to it... I can take over control at any time by turning on the transmitter.
Start here -
Once you can read the incoming pulse width using the code above, you can add an if statement to turn your camera on and off, but the starting point is the code in the post above - or you could use the dreaded pulseIn function
I have managed to use Duane’s code, together with GPS to make an autonomous vehicle navigate to a waypoint.
It was very smooth and easy to understand his code before I got to it…
I can take over control at any time by turning on the transmitter.
Got a video ? I will put a link to your project on the blog if thats ok ?
but PWM is not a digital signal
Yes it is.
there is no TRUE or FALSE
Yes it changes rapidly but the logic levels are still true and false.
don't understand something?
The video would be boring, it was a boat navigating a mile out into the lake. I posted my code in a different thread when they asked for it.