Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0
- instead of including wiring.h, WProgram.h, WConstants.h and pins_arduino.h, you only need Arduino.h
- Wire.send() is now Wire.write(), Wire.receive() is now Wire.read()
- If you get error messages like "call of overloaded ‘write(int)’ is ambiguous", you probably need to add "(byte)" before a constant argument, eg: Wire.write((byte)0x00);
- It is possible to use conditional statements to write code that is compatible with older and newer versions, eg:
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif - More complete list and additional information:
- http://makezine.com/2011/12/01/arduino-1-0-is-out-heres-what-you-need-to-know/
- http://code.google.com/p/arduino/wiki/Arduino1
Trackbacks
The author does not allow comments to this entry
Comments
Display comments as Linear | Threaded