Hi. I just create my first circuit by following a tutorial on youtube but my LED doesn't turn on when I start simulating. I'm confused because I have checked the flow and it's already correct. Does anyone know what is wrong with my circuit?
Your simulating in which program (tinkercad, wokwi, ...)?
Where is the code that is supposed to turn the LED on? Post it here using code tags as described in https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966#posting-code-and-common-code-problems.
I am simulating on Tinkercad. Does arduino require a code? I thought simulating arduino on Tinkercad doesn't require code to start..
I'm not familiar with tinkercad.
If there is no code running, pin 12 is an input (high impedance) and can't deliver enough current to light the LED.
To have the LED on, you need to set the pin as output using pinMode() in setup and next you can control it with digitalWrite() in setup() or in loop() depending on your needs.
I've just had a look at Tinkercad.
It seems that there is some default code that blinks the built in LED on pin 13.
You could modify that code to blink your LED on pin 12.
Or you could connect your LED to pin 13 and use the existing code.
thanks. It works!
thank you
Glad to hear that you have got it to work.


