Hi guys,
I have a problem with changing the brightness of my LED connected through Arduino Nano. I have a pot connected to an analog input and I mapped it from 0 to 255. I then applied this value in the digitalWrite func. When I check the values through serial monitor everything is ok, but the led is just on or off. The brightness doesn't change. Im using B100K pot and 220 ohm res with yellow LED. I have tried different pots and LEDs but nothing changes. I even set the brightness manually in the code outstepping the pot but nothing changed. Here is the code:
Do not feel bad, you and thousands of others have made the same mistook, You might consider watching a few arduino tutorials, they will help your understanding. The Arduino Cookbook is a good handbook as well.