Well, sorta. It's still about month away but I already ordered my birthday presents, just to make sure they'll be there on time (sure...). But anyway, I'll be the proud owner of an Arduino Mega 2560 (Atmega2560) and a clone Nano (with an Atmega168), so I can finally test whether or not my code actually works on some other hardware than an Atmega328p. I'm especially interested in the 2560 with its truckload of pins.... read more
Release 0.4 is coming along nicely, a ton of work has been done, loads of features have been added and just a few tickets are open.
Here's a list of new features that have already been completed:
Phew, finally!
Here's what's new in 0.3:
There I was, happy with my working homemade Esky Transmitter setup, and then I just had to break it. I modified bits of code and now it's not doing anything anymore. Can't remember what I changed and forgot to version it... Anyway, my test rig is not working anymore, so I'm unable to test most of the 0.3 features. I hope I can get everything up and running again today so I can release 0.3 this Wednesday.... read more
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.... read more
Something has been bothering me ever since I started this project: how to handle output of various functions. If you take a look at the Swashplate code you can see the problem: depending on the configuration you get two to four integers as output. Back then I solved this by having the user pass references to variables in which to store the result of swashplate mixing. The problem with this is that the user will have to pass references for all four result integers and was stuck with defining and passing dummy variables for results he doesn't need; ugly.... read more
It's been a while! Renewed interest and a bit of free time can do miracles for a hobby project :) Anyway, I hope to be able to release version 0.3 somewhere this weekend. This release will add the following new features:
- Plane functionality!
- Basic support for multiple wing, tail and rudder types
- Basic support for flaps and air brakes
- A system for simple and more complex retracts (usable for both plane and heli)
On a more technical level I've added a few bits and listened to some requests:
- added a generic mix function (which will be used for programmable mixes in 0.4)
- made PPMOut able to use any pin for output, pins 9 and 10 are still highly recommended, but the other pins should work as well.... read more
Version 0.2 has been released! Grab it now from the Downloads section! I also finally figured out how to change the "looking for the latest version?" button, so that's pointing to the correct file now.
All new features have been discussed in my previous blog post and they're also in the readme file.
What's next? The next release will be aimed at adding plane specific features. I'll be adding various mixes to support the most common types of airplanes. If you have any suggestions, feel free to post them in the forums or create a ticket. I'm open to all comments and suggestions.
I'm really close to releasing version 0.2 of ArduinoRCLib! This release will add Servo signal input/output and PPM input. These are the building blocks you want when you're interested in building a receiver or a flight controller. They allow you to easily read data coming from a receiver and control servos, for example.
Quite a few bits have been refactored, the use of Timer 1 for example, and the use of normalized values vs microseconds.... read more
It's official, I hate the Arduino IDE. There's just so much wrong with it that I hardly know where to begin...
First and foremost: the build pipeline. Who came up with this anyway? I know Arduino is aimed at beginners, but that's no excuse to make a mess of things. What happens when you hit the 'Verify' button (compile) is the following:
I've added a PPMIn class which will help you decode an incoming PPM signal. This can be used for implementing a trainer port, or for building a receiver. It relies on being called by an external interrupt handler, like PCINT0/1/2 or INT0/1. This gives you the freedom to use your own, or some other interrupt handling mechanism (like the pcint library).
Another class that's been added is the ServoOut class. This can be used to control servos. It's kind of like the 'official' Servo library that comes with the Arduino IDE, but that library won't play nicely with the ArduinoRCLib. Also, I hope my implementation performs a bit better, I've done all I can to keep the interrupt handler as small as possible.
Never ever ever ever put crucial initialization code (like timer initialization) in the constructor of a class, especially when such a class will be used as a global variable. You simply can't rely on the static initializers, there's no defined order in which static data will be initialized, but you can be pretty sure it will be before your setup() function is called (and even before the Arduino's init code). Chaos ensues. Just spent several hours trying to figure out why the heck my code wouldn't functions properly. You've been warned...
The easiest solution is to introduce a start function to the class to do all the initialization and call it from the setup() function.
So much for testing... When I was implementing and testing a PPM decoder I accidentally discovered I made a mistake in the PPM generator; I forgot to subtract the pulse length from the channel length, so instead of a channel value of 1500, I was sending a channel value of 2000 (for a pulse length of 500). Whoops... Next time I'd better hook my test rig up to an oscilloscope, instead of relying on a blinking LED ;)... read more
Version 0.1 has been released! Check out the downloads section for the zip, it includes Doxygen generated documentation.
I've included schematics for all examples using Fritzing.
I've finished refactoring all of my existing code into neat little classes, cleaning up any mess there was and adding some much needed features. I've added samples for all classes and even a fully function six channel helicopter transmitter example. Wiki pages have gotten some content and I even got all the code to be Arduino 1.0 compatible.
All that's left to do now is actually test all the code. That's the last ticket for the 0.1 release. After that it's just tag it, zip it and upload it!
Phew, pretty major feature implemented! I've added PPM code, I have to admit I have yet to test it, but it's based on code I used earlier, so it should work...
Anyway, it's got some pretty neat features:
-variable amount of channels
-variable servo center point (1500us, 1520us, whatever you want)
-variable servo travel (500us, 600us, whatever)
-variable pulse length (440us, 500us, whatever)
-variable end of frame length (10ms, 5ms, whatever)
-interrupt driven using timer 1, thus extremely low consumption of CPU cycles
-all settings changeable at runtime (even the amount of channels)
-frame synchronization, will always transmit a full frame, even when you change settings
-debug option to slow down PPM output 256 times
-inverted signal option
-work buffer supplied by client code, never uses more memory than needed
-selectable output pin (9 or 10)... read more
Welcome to Arduino TX lib, a small library containing all the functions you need to build an Arduino based PPM transmitter! The following features are already implemented, but require some cleaning before they will be made available: