I am having a problem with pins of Arduino Uno. I have connected a LED to one of the analog pins (A0), and I want to light up the LED with different intensinty.
int ledPin = A0;
void setup() {
// put your setup code here, to run once:
pinMode(ledPin,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
analogWrite(ledPin,500);
}
The point is that even if I change the value of analogWrite, the LED lights up always with the same intensity.