Pages: [1]   Go Down
Author Topic: The Graph Program  (Read 343 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Newbie
*
Karma: 0
Posts: 46
Love Arduino, Want the T-Shirt.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried to verify the arduino code for the Graph projects in Tutorials http://www.arduino.cc/en/Tutorial/Graph. but it said : In function 'void setup()':
error: redefinition of 'void setup()' In function 'void loop()': any reason for it to do this.
I'm using arduino 0010
Thanks
Logged

Never wing it, unless it's convenient.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6378
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you put both the arduino AND processing code into Arduino?  The only thing you should have inside arduino is:
Code:
void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.println(analogRead(0));
  delay(20);
}

The other stuff gets entered into the "processing" environment and compiled/run on the host system, but I don't know anything about that...
Logged

UK
Offline Offline
Newbie
*
Karma: 0
Posts: 46
Love Arduino, Want the T-Shirt.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I no  but it comes up with the error message.
Logged

Never wing it, unless it's convenient.

UK
Offline Offline
Newbie
*
Karma: 0
Posts: 46
Love Arduino, Want the T-Shirt.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ah got it working
didn't understand the tabs thing
sorry I'm n00bish
Logged

Never wing it, unless it's convenient.

Pages: [1]   Go Up
Jump to: