Green LEDs start on, and I can't fix it

I'm doing a project for a computer programming class, but I'm having a problem with it I can't figure out how to fix. Basically, there's a red LED that will start at a random brightness, then it will reset. You then use a potentiometer to control the brightness of the LED to get it as close as you can to the original brightness. Then, you press a button, and green LEDs will light up to indicate how close you were. The problem is, the first two green LEDs start turned on, and I can't fix it. Weirdly, the first LED is less bright than the second one, even though they're connected to digital pins. I'm guessing this is a wiring issue, but I don't know what exactly is wrong. I'm doing all this in Tinkercad, so I will put an image of the wiring and the project link. Please help!

I would like to help but not enough to sign up for an external app. If you want help here, post your well formatted code here in a code block as described in the "how to use the forum" post at the top of every forum section.

Pins 0 and 1 belong to the hardware serial port so you should not use those pins as GPIO.

1 Like

Don’t use D1 or D0 as they are used for serial communications.


In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.

Use the </> icon from the ‘posting menu’ to attach the copied sketch.

2 Likes

Oh. I changed the pins and now it works. Thanks.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.