void setup() {
pinMode(3,OUTPUT);
Serial.begin(9600);
}
void loop() {
int pot= analogRead(A1);
int brightness = map(pot, 0, 1023, 0, 255);
analogWrite(3,brightness);
Serial.println(pot);
delay(1000);
}
void setup() {
pinMode(3,OUTPUT);
Serial.begin(9600);
}
void loop() {
int pot= analogRead(A1);
int brightness = map(pot, 0, 1023, 0, 255);
analogWrite(3,brightness);
Serial.println(pot);
delay(1000);
}