/* Potensiometer โ atur kecerahan LED (PWM) */ const int potPin = A0; // wiper potensiometerconst int ledPin = 9; // LED pada pin PWM int potValue = 0;int brightness = 0; void setup() { pinMode(ledPin, OUTPUT);} void loop() { potValue = analogRead(potPin); brightness = map(potValue, 0, 1023, 0, 255); analogWrite(ledPin, brightness); delay(50);}