After upgrading to Arduino 1.0.1 none of my programs will compile. There are two libraries I typically use Button & Servo. I don't understand why nothing will compile. Do I need to upgrade my libraries also? See attached image.
#include <Servo.h>
#include <Button.h>
/*
ArduKart
This program was written for an Arduino powered GoKart.
Press GO and the kart with ramp up to top speed
This is done trough PWM to a motor controller
Press REV and the kart will go into reverse with a preset max speed
This is also done through PWM to a motor controller
This shit is pretty dope!!!!!!
*/
Servo leftMotor;
Servo rightMotor;
Button goButton(8,BUTTON_PULLUP);
Button revButton(7,BUTTON_PULLUP);
int goPos = 90; //puts motor controllers @ 90 degrees (neutral)
int revPos = 90; //puts motor controllers @ 90 degrees (neutral)
int rampSpeed = 0; //time it takes to ramp up to full speed
void setup()
{
Serial.begin (9600);
leftMotor.attach(9); // left motor controller connected to digital pin 9
rightMotor.attach(10); // right motor controller connected to digital pin 10
}
void loop()
{
//delay(100); //delay for testing
if(goButton.isPressed())
{
if (goPos < 180) {goPos ++;}
if (goPos > 180) {goPos = 180;}
leftMotor.write(goPos);
rightMotor.write(goPos);
delay(rampSpeed);
}
else
{
goPos = 90;
}
if(revButton.isPressed())
{
if (revPos <= 90) {revPos --;}
if (revPos < 0) {revPos = 0;}
leftMotor.write(revPos);
rightMotor.write(revPos);
}
else
{
revPos = 90;
}
Serial.print("Reverse Postion:");
//Serial.print('\t');
Serial.print(revPos);
Serial.print('\n');
Serial.print("Go Position:");
//Serial.print('\t');
Serial.print(goPos);
}