Mission 5 - Light Dimmer
 DuinoKit Jr. - View Only. See new "Mission Manual" forum for manual and code   Started by Daniel Alich   2017-06-27 18:35:03 -04:00   Comments: 1    Viewed: 879

  1. Daniel Alich
    Daniel Alich Member Staff Member
    252_1498602826_Mission 5-1.jpg

    252_1498602815_Mission 5-2.jpg

    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 18:35:03 -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!