Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int pot, pwm;
- void setup()
- {
- pinMode(11, OUTPUT);
- pinMode(A0, INPUT);
- }
- void loop()
- {
- pot = analogRead(A0);
- pwm = map(pot, 0, 1023, 0, 255);
- analogWrite(11, pwm);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement