Hey, I worked with arduino a bit last year, but took a long pause to do the whole finishing up high school thing. Since I'm done with school until college, I've picked up the arduino again, but since the break I've lost whatever I used to know.
I'm trying to start a program to simply read the values of the vertical and horizontal inputs of a thumbpad from Sparkfun. I run the following code, and it looks good, except for teh fact that I get the following error when compiling:
error: expected unqualified-id before numeric constant In function 'void loop()':
Here's my program:
int verPin = 0;
int horPin = 1;
int ver = 234
int hor = 456
void setup() // run once, when the sketch starts
{
Serial.begin(9600); // set up Serial library at 9600 bps
pinMode(verPin, INPUT);
pinMode(horPin, INPUT);
}
void loop()
{
ver = analogRead(verPin);
hor = analogRead(horPin);
Serial.print("Vertical ");
Serial.println(ver);
Serial.println("Horizontal ");
Serial.println(hor);
}
I'm running Vista with SP1 and using the arduino Diecimilla.