using pre written code from arduino projects, I have the correct board and port selected but it won't verify or download. I'm brand new to this, any help would be appreciated.
I moved your topic to an appropriate forum category @pyler.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.
Sorry the crystal ball is in the dishwasher…
Welcome to the forum.
maybe start here:
https://www.arduino.cc/en/Guide
please give a link to where you got that code.
Please quote the full output when you try the verify - copy & paste using the <CODE/> tags (as described in the "How to get the best out of this forum" guide linked earlier)
mine also ![]()
As a new member, you probably blew past some good advice, somewhat similar to:
So 5 posts to say read the best practices and give us more info should be enough
Let’s wait now to hear back from @pyler
I got the code from the Arduino projects sitehttps://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://projecthub.arduino.cc/&ved=2ahUKEwjlveL56rSBAxXZmYkEHYKCCvsQFnoECA4QAQ&usg=AOvVaw01PLBLu43LlfEX5N_URy1P
Follow this tutprial to provide the detail-informations that are needed to analyse your compiler-error
Edit: The link that you provided guides me to this overview
This means the link does not work.
As a general advice you have to be more precise if you want to be successful in programming.
Even if it is just pre written code
I used "simple traffic light" in the Arduino Project Hub.
I prefer to "copy" from the site and "paste" into the IDE
I also like to test the project in Wokwi.com simulator...
simpletrafficlight - Wokwi ESP32, STM32, Arduino Simulator
p.s. Most projects on Project Hub are a mess with multiple/duplicate/unformatted sketches, drawings and schematics on the same page. The site is not updated from legacy HTML.
Hi @pyler ,
Welcome to the forum..
are you getting a specific error message??
like others have pointed out the link to the source you're using appears broken..
you should be able to verify (compile) code even if board is not present..
can post the code here, use the code button and paste it in..
lots of helpers here, help us help you.. ![]()
good luck.. ~q
The format of this comment in the sketch sketch is getting messed up by the copy process.
//Turns OFF all LEDs
becomes
//Turns
OFF all LEDs
Error is 'OFF' not declared in this scope"
EDIT: It appears I was replying to @xfpd and the code he linked. It's not determined that the OP @pyler was using the same code.
Yes. I should have written "copy button" (where the arrow points) which copies raw code.
Copying code written inside HTML causes pasting errors. Sorry.
Most projects on Project Hub are a mess with multiple/duplicate/unformatted sketches, drawings and schematics on the same page. The site is not updated from legacy HTML.
Agreed.
It seems there are indeed two copies of the traffic light code on the linked page. The copy button from the first(top) one, produces code which compiles. The copy button on the second (lower) duplicate sketch produces the copy error.
I used the lower copy when testing for the issue. ![]()
Thanks to all who replied to my vague questions.


