Hello, I'm new to this forum and Arduino. I am just a Dummy. And This is my first post here.
I am making a project to light up LEDs in a randomized way.
It works oke.
I know that I can not use A6 and A7 on my Nano.
But is it possible to light up LEDs on the PMW pins.
Thanks
So, now I know it is possible to use the PWM pins to let LEDs shine.
But what I not know is how I can LEDs shine when connected to the PWM-pins.
So if there is anyone who know how to program a Nano so I can use PWM pins to light-up LEDs connected to this pins, please will you write this down in this topic.
Connect LED to PWM pin, with current limiting resistor.
Connect other end of LED/resistor combo to ground or supply (to taste).
Activate PWM using digitalWrite, or analogWrite (to taste)
So, it is just as the other pins.
But, what number has the PWM pins.
For D03 I write analogWrite(3, 200) for example. So the LED connected to D03 shines bright.
But what numbers do I have to use for the PWM pins?
Assuming you have the LED between the pin and GND, the "200" represents a fraction of roughly 200/255 of full brightness.
In practice, you won't notice any difference between "200" and "255"
I just have to know what the pins numbers for the PWM pins are.
I have connected LEDs to D3 tot D13. And LEDs are connected to A1 to A5. A6 and A7 don't work for this target.
A0 I use for the Randomize function.
So all the LEDs are on in several ways, reveral times and several brightnes.
And I hope I can use the PWM pins for the same function.
This Nano I use for a model train project. The LEDs are mounted in houses in several cambers.
Like in reality the lights goes on and off in a Randomized way.
In lot of model train projects the houses are light on all at the same time and the hole houses are light on. But that is less reality than my way.
Sorry for the bad English grammatica. But it is understandable I hope.