Go Down

Topic: PWM in (Read 646 times) previous topic - next topic

Ivanum

Jun 07, 2013, 03:01 pm Last Edit: Jun 07, 2013, 03:03 pm by Ivanum Reason: 1
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?

AWOL

Have a look at some of DuaneB's solutions.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Ivanum

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 :(

Ivanum

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

sbright33

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.
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

DuaneB

Hi,

   Start here -

http://rcarduino.blogspot.ae/2012/01/how-to-read-rc-receiver-with.html

   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

Duane B

rcarduino.blogspot.com
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

DuaneB

Quote
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 ?

Duane B
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

Grumpy_Mike

Quote
but PWM is not a digital signal

Yes it is.
Quote
there is no TRUE or FALSE

Yes it changes rapidly but the logic levels are still true and false.

Quote
don't understand something?

See this:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html

sbright33

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.
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Go Up