const int pot = 0;
const int led = 10;
void setup(){
pinMode(pot, INPUT);
pinMode(led, OUTPUT);
}
void loop(){
int p = analogRead(pot);
p = map(p, 0, 1023, 0, 255);
analogWrite(led, p);
}
const int pot = 0;
const int led = 10;
void setup(){
pinMode(pot, INPUT);
pinMode(led, OUTPUT);
}
void loop(){
int p = analogRead(pot);
p = map(p, 0, 1023, 0, 255);
analogWrite(led, p);
}