Arduino 1.0 Library compatibility

This is only half a request, but there isn’t really a better sub forum to post in.

I’ve built up my personal arsenal of modified (and already working) Pololu Arduino libraries. The request would be to make them official, or at least be assured they are being tested so they can be.

So far, I have:
Orangutang:

Analog
Buzzer*
Digital
LCD
LED
Motors
Pushbuttons
Resources
Pololu3pi
PololuQTRSensors
PololuWheelEncoders
L3G4200D
LSM303 (converted from the new version for DLM & DLH)

The first example for the OrangBuzzer lib doesn’t work. I don’t know why, and since I don’t use it, it’s not top of my list to get debugged. The other examples work, so I assume the library itself works.

There all in one zip file for now, though I could separate them out if it was desired.
PololuLIBsArduino1_0.zip (115 KB)

Hello, Darth Maker.

Thanks for sharing your updates to our libraries! I will be looking into updating them officially, and it sounds like the work you’ve done so far will be very helpful.

- Kevin

For anyone else who wants to edit the libraries and needs to know where to start, here are the basics.

I usually start by attempting to compile one of the example programs, then go from the errors that are produced.

For many libraries, the only change you have to make is the #include file. If you get an error about an include file not being found, this is probably why.

Replace any of these lines

#include <WProgram.h>
#include "WProgram.h"
#include <WConstants.h>
#include "WConstants.h"
#include <wiring.h>
#include "wiring.h"

with

#include <Arduino.h>

I usually just comment out the old include.

For the libraries that I’ve done, the only other necessary change has been to I2C/TWI/Wire code. Basically you go through the file and change every “Wire.send()” and “Wire.receive()” to “Wire.write()” and “Wire.read()”. If you need to make this change, you will get an error like this:

...\Arduino\libraries\L3G4200D\L3G4200D.cpp:26: error: 'class TwoWire' has no member named 'send'

There are some other changes too, but most of them are either additions (which don’t affect current code) or are very specific changes, which only apply rarely. If you want to read more about them, you should reference this post on the Arduino blog, and the release notes for 1.0.

If someone could test the Dual VNH5019 motor shield lib, it could be added. All I did was change the header file, and it should work, but it aught to be tested. I just don’t happen to have one of these boards.
DualVNH5019MotorShield.zip (5.31 KB)

Here is the standalone PololuQRTLibrary. I believe the only difference from the first one I did is that the standalone download has two examples with it.

Anyway, here it is, analog code is tested and working, however, the RC is untested. Again, no reason it wouldn’t work, just untested.
PololuQTRSensors.zip (13 KB)

The Dual VNH5019 shield driver works fine in 1.0
It had a bug in 0022 due to the change in name of Arduino.h to WProgram.h, but that is fixed in 1.0

However, note that the board does not work with the servo library on an Uno, since the servo library uses timer 1 with an Uno (it goes to timer5 on a Mega, provided you do not have tons of servos), making analogWrite not available on pins 9 and 10.

Darth Maker,

I have registered to thank you for one of your replies above. I have been trying to sort out Arduino 1.0 to work with a large program that I had written which works under 0.22 but I couldn’t get the ROTARYENCODERACELLATION library to work. Just by changing every reference to wiring.h into Arduino.h it now compiles.

[size=200]THANKS.[/size]