const int fsrPin = D2; const int ledPin = D3; void setup() { pinMode(ledPin, OUTPUT); } void loop() { int fsrValue = analogRead(fsrPin); int brightness = map(fsrValue, 0, 4095, 0, 255); analogWrite(ledPin, brightness); delay(10); }