I have a new Uno board, running Mac OSX 10.7.4 (Lion) on a Mac Mini. Everything seems to connect, but it starts to upload then gets 'undefined reference to setup' and undefined reference to loop' compiling error message. Tried it on another Mac running Leopard, same messages. Tried it on PC running Windows XP- dittoGet green light and blinking yellow and it starts to load, so it doesn't appear to be a connection problem per se. HELP!
What are you trying to upload? Something you've written? One of the examples?
Just trying to upload the initial sketch to run a robot.
Too terse.
Sorry. Like my username, it's all new to me. I built the Popular Mechanics 'Build You're First Robot'. The Arduino Uno is the suggested board. Robot is done but the initial upload for the Uno gets the errors mentioned, so it has never loaded a sketch. Tried all the suggestions in troubleshooting. It seems to physically connect OK but it starts to compile,then about halfway through, it stops with the error message.
core.a(main.cpp.o): In function main': /Users/bobserver/Desktop/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:11: undefined reference to
setup'
/Users/bobserver/Desktop/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:14: undefined reference to `loop
allnu2me:
Like my username, it's all new to me.
I know.
A sketch must have two functions... setup and loop. In other words, this is the smallest possible sketch that can be uploaded (you may want to try uploading it)...
void setup( void )
{
}
void loop( void )
{
}
The sketch you are trying to upload does not have either of those functions.
I built the Popular Mechanics 'Build You're First Robot'.
This?
Is this the sketch you are trying to upload?
If not, what sketch are you trying to upload? (please wrap code in
</mark> <mark>[code]</mark> <mark>
</mark> <mark>[/code]</mark> <mark>
tags)
Yes that is the Popular Mechanics project I built. The sketch is from the Arduino site for Mac OSX that is supposed to have basic functions. Doesn't appear to be the same as the one you sent. (Which reports errors also).
allnu2me:
The sketch is from the Arduino site for Mac OSX that is supposed to have basic functions.
Link?
I told you I wasn't too bright. I found out where to add the commands for the sketch. It works! Thanks for your help. Guys like me need all the help we can get and then some.
Thanks again.
I'm glad you have it working.