Arduino Uno wont upload program

Hello,

I just recently got an Arduino starter kit with an Arduino Uno. I tried to do the first exercise, plugged everything according to plan. But when I plug the board to my computer and want to upload the program called CIRC-01 I get the following error message

Arduino: 1.0.6 (Windows Vista), Board: "Arduino Uno" core.a(main.cpp.o): In function main': D:\arduino-1.0.6\hardware\arduino\cores\arduino/main.cpp:40: undefined reference tosetup' D:\arduino-1.0.6\hardware\arduino\cores\arduino/main.cpp:43: undefined reference to `loop'

I am new to electronics or programming and I have absolutely no idea what this means. I tried changing the com port but the problem remains.

Anyone knows what I should do?

Thanks

Please post the exact code that you are using. You most likely have a layout error in the code. Please use the insert code (#) symbol to properly post the code.

The basic blink sketch should look like this:

void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}

Hi, the C language for the arduino uses void setup void loop

not void setup void main

changing "main" to "loop" will help it compile, which is what is failing at the moment.

Please post a copy of your sketch.

Tom.... :)

I have a similar problem trying to upload HAL2Arduino. to arduino 1.6.1 {Linux Ubuntu 10.04)

Please note that the error says "main.cpp:40: undefined reference to setup'" and "main.cpp:43: undefined reference toloop'"

Regards Bioll

Post your code!

Mark

I tried to sent the code but it is too large. The file name is HAL2Arduino_0_6d.ino which can be downloaded from HAL2Arduino_0_6d

The error message was

Arduino: 1.6.1 (Linux), Board: "Arduino Uno"

core.a(main.cpp.o): In function main': /home/billsmill/Software/arduino-1.6.1/hardware/arduino/avr/cores/arduino/main.cpp:40: undefined reference tosetup' /home/billsmill/Software/arduino-1.6.1/hardware/arduino/avr/cores/arduino/main.cpp:43: undefined reference to `loop' collect2: error: ld returned 1 exit status Error compiling.

I read this to say that the error is in main.ccp

Regards Bill

Hi, If you use REPLY rather than QUICK REPLY you will find in the lower left corner an "Attachments and other options" facility. This will allow you to attach the sketch file.

Tom.... :)

Sorry about that, thanks for the lesson.

I have attached it.

Bill

HAL2Arduino_0_6d.ino (8.53 KB)

Has anybody any thoughts

Bill

The sketch attached to post #7 is not complete. It lacks a function named setup and a function named loop. Without those two functions it will not, as you have discovered, compile.

Given the fact that you downloaded the sketch I suggest that the download did not finish; that the sketch was truncated.