Mission 5 - Light Dimmer
 DuinoKit Essentials   Started by Daniel Alich   2017-06-27 21:42:38 -04:00   Comments: 1    Viewed: 309

  1. Daniel Alich
    Daniel Alich Member Staff Member


    int potPin = 0;
    int potValue = 0;
    int led = 9;
    void setup() {
    pinMode(led, OUTPUT);
    }
    void loop() {
    potValue = analogRead(potPin);
    analogWrite(led, potValue / 4);

    delay(10);
    }
    Daniel Alich, 2017-06-27 21:42:38 -04:00
  2. (You must log in or sign up to post here)

Report Post

Write your reason

Log in | Sign up
Terms & Conditions!
Help!