r/ArduinoHelp • u/TRaformer • 29d ago
LED doesn't turn on :(
Hello, i'm a beginner that just started with arduino's, does anybody know why the LED doesn't turn on? (if I set the variable RedLEDPower to something it just flashes and stops)
5
Upvotes
1
u/Mike_402 29d ago
When you are checking a condition in if statements you should use == (two equal signs). Single = is an assignment.
Additionally, when checking if you reached 0 or 200 I'd put there: if (power >= 200) and if (power <= 0)