Go Down

Topic: Arduino servo emulator (Read 1 time) previous topic - next topic

Johnboy888

Hi All, we've seen how an Arduno can drive radio control type servos, but has anyone written code such that Arduino connected to an R/C receiver can emulate a servo(s) ? To the point of increasing/decreasing an integer value when the transmitter controls are moved ?

Thanks
John

keeper63

Yeah - the basic way is to use the pulseIn() function:

http://arduino.cc/en/Reference/pulseIn

There are other ways using timers and pin change interrupts, but the above is the basic way. Look also for the code for the Dagu Wild Thumper Motor controller:

http://www.sparkfun.com/products/11057

It has a complete demonstration code set that uses pulseIn() for R/C PPM decoding.
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

DuaneB

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

Johnboy888

Thanks for the replies guys - much appreciated. I checked your blog entry Duane, it looks interesting, so I'll give it a shot and I'll look forward to seeing part 2 !!

I didn't even know about rdarduino site !!

All the best
John

DuaneB

Hi,

If you look around the site, there are a lot of follow up posts including a simple RC Robot with the full code provided-

http://rcarduino.blogspot.com/2012/05/interfacing-rc-channels-to-l293d-motor.html

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

Go Up