Lately I ran into some issues with the ServoOut class; sometimes servos wouldn't respond or would jitter a lot. At first I suspected the ServoOut code to be buggy, but even stripping it down to the bare minimum didn't solve my problems. After many frustrating hours of trial and error I decided to analyze the generated servo signal with an oscilloscope. Wish I had done that sooner.
As it turns out, the motors in the servos are generating a lot of electrical noise, which in turn messes up the servo signals. The Arduino lacks the filters to filter out this noise. These filters are present on most receivers, as such they have no problems with moving servos at all. Since I have little knowledge about building filters, I decided to stick to using real receivers to test anything that uses servos. Having to deal with a big transmitter and sticking jumper cables in the trainer port is anything but handy.
Enter the NRF24L01+. I got four of these RF chips on a breakout board for a few dollars off eBay some time ago, just to play with. This particular chip turns out to be compatible with the NRF2401AG, which is the chip used by Esky in both their transmitters and receivers. A few evenings of Google, coding and hacking later I had all the info I needed to make the Arduino pick up all the information the Esky transmitter is throwing through the air. The next step was getting the Arduino to mimic an Esky transmitter; now I can just use an Esky receiver with a battery pack and a bunch of servos to accurately test all sorts of servo related code (like the PlaneModel class). And that works pretty darn well.
I'm planning to include support for the NRF24L01+ as well as Esky TX/RX simulation to the 0.4 release. This should make ArduinoRCLib a lot more useful since you'll actually have something to build a real transmitter with. Cool? Definitely!
Another feature I had planned for 0.4 is support for an on-board camera. I bought a FlycamOne eco V2 about a year ago for my helicopter and had loads of fun with it. The cam can be controlled by a remote; just plug it into a free channel on your receiver and assign a switch to that channel. Simply flicking the switch shortly will make it start or stop recording, or it can take a picture. You can switch modes by holding the switch for about three seconds, and flip the image by holding it for ten seconds. The annoying part about this camera is that it doesn't remember settings. Since I mounted it upside down, I have to flip the image every time I power the helicopter (hold the switch ten seconds, see if LEDs start blinking, release switch). The FlycamOne class will happily do this for me. Furthermore, it keeps track of whether it started recording or not, so with a bit of programming I can have the position of the switch indicate whether or not it's recording. It's even possible to make it start recording automatically when taking off, and stop after landing. Cool? Yup!
And since this was pretty easy to implement (and I really wanted to do something fun) I moved FlycamOne support to 0.3.
By the way, I've ordered a bunch of sensors (gyro, magnetometer, accelerometer, barometric pressure) so look forward to 0.5 ;)