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 ?
Yeah - the basic way is to use the pulseIn() function:
The Arduino programming language Reference, organized into Functions, Variable and Constant, and Structure keywords.
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:
It has a complete demonstration code set that uses pulseIn() for R/C PPM decoding.
Have a look at my blog starting here -
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
If you look around the site, there are a lot of follow up posts including a simple RC Robot with the full code provided-