#include #define PIN_LED 3 int potValue = 0; void setup() { pinMode(PIN_LED, OUTPUT); Wire.begin(); } void loop() { potValue = analogRead(A0); potValue = map(potValue, 0, 1023, 0, 255); Wire.beginTransmission(42); Wire.write(potValue); Wire.endTransmission(); analogWrite(PIN_LED, potValue); }