Updated for Arduino 1.5+ library format.