Updated to work with Arduino 1.0