#define LED D6
#define pot A0
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(LED, INPUT);
pinMode(LED, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int value=analogRead(pot);
analogWrite(LED,value/4);
Serial.println("Value");
int a=map(value,0,1023,0,255);
Serial.println(a);
delay(1000); // this speeds up the simulation
}