Updated to work with Arduino IDE v1.0+