Updated Arduino example code to be Arduino 1.0+ compatible