Hello,
As a beginner I want to try if I can make led on and off in a sort of circle.
Now I thought this could work : roelof_round - Wokwi ESP32, STM32, Arduino Simulator
of course I have to do the wires.
Am i on the right track or did I oversee things ?
And the code! Otherwise, yes, it’s an easy project,
of course also the code.
I think that is the easy part.
Making this was hard enough and I had to change things a lot.
But learning is mostly trail and error.
jim-p
May 6, 2024, 10:04am
4
I see a short circuit, wrong resistor values, LEDs in backwards and resistors not connected to the breadboard.
I hope I solved everything except I do not see the short circuit.
I do not see any short circuits. In fact I don't see any circuits at all.
1 Like
yes, back to the drawing board to see how I can solve this
How many LEDs will be lit at any instant?
If only 1, you need only 1 resistor, which should make the circuit much easier.
jim-p
May 6, 2024, 10:50am
10
Why don't you try this first, it will be easier to wire and will also make debugging your code easier.
See if you can write code that will light the LEDs one at a time from left to right, then right to left. Then later you can arrange them in a circle.
2 Likes
Thanks,
Maybe I want to take a too much big step and I have to do some smaller steps for learning
jim-p
May 6, 2024, 11:03am
13
True words of wisdom.
Otherwise you will be trying to debug hardware and software at the same time and pulling your hair out in fustration.
You can use a simulated breadboard if you want, but the wokwi lets you just wire things up directly.
At the very least it's only half the work to build something…
a7
10kOhm is a bit high for a led series resistor.
I would recommend something between 220 ohm and 1 kOhm.
I looked at the picture but should the one not be in ground instead of 5v ?
I miss ground
jim-p
May 6, 2024, 1:40pm
17
No. To turn the LED ON you set the output LOW not HIGH
Like this:
digitalWrite (LED1pin, LOW)
You sure.
On the course I learned the other way around.
jim-p
May 6, 2024, 2:22pm
19
You can do it either way.
If you flip all the LEDs around so that all the cathodes are connected together and then connect the resisor to ground, you can set an output HIGH to turn on an LED.
With either way you can only turn on one LED at a time.
NOTE: the resistor is 470 ohms
I tried but I cannot see how you make those long legs.
The led's on wiki page has only 2 very short legs.