void setup() {
// put your setup code here, to run once:
pinMode(9, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int potValue = analogRead(A0);
int brightness = potValue / 4; // convert 0-1023 to 0-255
analogWrite(9, brightness);
}