Planned Support

Motivation


Back in the past I built one of Fred Martin's 68HC11 Miniboards. It used a Motorola 68HC11, could be programmed using a free version of ICC, and Fred made a neat library of commands available for it. Not much, but enough to play with. And with the limited memory available, not much was way better than getting everything and the kitchen sink. There was a command to get an analog value from an A/D pin, a command to set the speed on any of four motors plugged into the Miniboard's H-bridges, and a couple of commands for reading and writing from and to the digital I/O ports.

When my Baby-Orangutan first arrived, I looked for something like that for the Baby-O, but I couldn't find anything along those lines. When I finally picked up its big brother, the Orangutan, I had even more hardware but still almost no code examples to work from. Thank goodness for the Internet!

Looking for information on the AVR processors returned so many hits it was overwhelming. I did find some sample code, some in C, some in C++, some in BASIC. After some hemming and hawing and making a patchwork from a couple of sources, I made a start on my version of Fred's library, but for the Orangutan.

In the process I discovered that the AVRFreaks forum and Pololu's online forums are excellent sources of information for AVR processors, though there was less code for the Orangutans than I was hoping for. And since some of the wiring choices on the Orangutan are... creative... the off-the-shelf examples didn't always work. In the end I wound up with a hodgepodge of sources that gave me almost exactly what I needed, and coding on Orangutan-lib began in earnest.

Things being what they are, the library now has more code in it than Fred's library for the 68HC11. There's stuff for driving the Orangutan's LCD, two styles of motor control, code for driving servos, and code on the way for quadrature encoders, generic timers, etc. No kitchen sink in sight yet, but the library's filling up awfully fast.

But sometimes less really is better than more. For that reason, the library is designed so that in addition to the .c and .h files for the subsystem of your choice, the only other file you need to grab is device.h. There should be no other cross-dependencies inside the library code. At times this makes the code less than efficient, but first and foremost the idea is to make a library that's as simple or as complicated as the programmer wants it to be. Only use what you need.

Also, as much as possible the library is written with the expectation that you may have an Orangutan, a Baby-Orangutan, and an Orangutan-X2 all sitting on your bench. Two have LCDs. One does not. Two have one onboard LED. One has several. Two have onboard pushbuttons. One does not. You get the idea. Rather than force the programmer to remember to unlink code for hardware that isn't available on a particular platform, the library will try its very best to do that for you.

In the end we hope you enjoy owning and using your Orangutan. They're neat little controllers with a lot of potential. And have fun with the library, too.


-- Tom & Steve