Go Down

Topic: Very Beginning (Read 973 times) previous topic - next topic


I was just given an Arduino mega 1280 and I have never worked with arduino boards before hand. I could not find the getting started page for the mega 1280 and so I tried to follow the directions for the others (nano and such). When I tried uploading I got the following errors:

core.a(main.cpp.o): In function `main':
C:\Users\THESPA~1\AppData\Local\Temp\Rar$EX15.368\arduino-0022\hardware\arduino\cores\arduino/main.cpp:7: undefined reference to `setup'
C:\Users\THESPA~1\AppData\Local\Temp\Rar$EX15.368\arduino-0022\hardware\arduino\cores\arduino/main.cpp:10: undefined reference to `loop'

Any ideas?


There are two functions that must be present in every sketch - setup and loop.
I think you're lacking both of them.
Take a look at http://www.arduino.cc/en/Tutorial/Sketch
You could also try playing with some of the examples and modify them as you like to get familiar with the concepts rather than starting from scratch.


Apr 25, 2011, 02:05 pm Last Edit: Apr 25, 2011, 02:12 pm by James C4S Reason: 1
Welcome the world of Arduino!


Have you installed the Arduino IDE or are you just running it out of the compressed file?  This path implies you haven't full decompressed the IDE.

The standard getting started guide (found at http://www.arduino.cc/en/Guide/HomePage) applies to the board you are using. 

Also, without posting the actual code you are trying to compile, it can be difficult to troubleshoot.  When posting code, please wrap it with code tags (by pressing the "#" button in the post editor.)
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up