Arduino gave me an error with the contents:
"Arduino: 1.8.14 Hourly Build 2021/01/29 11:34 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
/var/folders/bn/zd0qgf7d1h36sbyqwsymn4mc0000gp/T//cclTPmB8.ltrans0.ltrans.o: In function main': /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp:43: undefined reference to setup'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Mega/Mega 2560."
I found the relevant code in the files, and it's highlighted in the screenshots.
Here's the code I was trying to upload:
(The error was only with this sketch.)
"int value = 0;
void loop() {
if (value == 255) {
while (value != 0) {
analogWrite(13, value);
value = value - 1;
}
}
else {
analogWrite(13, value);
value = value + 1;"
I omitted it because I did not need any setup.
Thanks for the answer!
(Weird error though. Maybe they'll remove that in version 2.0.1.
Currently running 1.8.14)
@anon16461537, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with your project. And project in this case includes programming mistakes See About the IDE 1.x category
In future, please post code properly using code tags. The simplest way
In the IDE, use tools -> autoformat
In the IDE, use edit -> copy for forum; this will copy to the clipboard.
Paste the clipboard in a post
Just like @UKHeliBob, I'm curious what is weird about it and why you would think that it will be removed?
If you don't need setup(), you can override the main() function in your sketch; in it's absolute simplest form
void loop();
int main void()
{
for(;;)
{
loop();
}
}
void loop()
{
}