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 to setup'
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.
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
}
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 to setup'
/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.
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.
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.