Created
May 2, 2019 10:50
-
-
Save maximeadjigble/fcb814019354ffc8be869f245cae972d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int ledPin = 3; | |
int valPot = 0; | |
void setup() { | |
} | |
void loop() { | |
valPot = analogRead(A0); | |
valPot = map(valPot, 0, 1023, 0, 255); | |
analogWrite(ledPin, valPot); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment