Last active
October 15, 2019 05:27
-
-
Save MargenauMaker/de75f98e1a58b79fc24c9035010f25dc 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
/* Baisc for loop for students to practice with | |
* Optimized for Lilymini | |
* written by B. Elliot Oct 15, 2019 | |
*/ | |
// Dim an LED using a PWM pin | |
int PWMpin = 3; // LED in series with 470 ohm resistor on pin 10 | |
void setup() { | |
// no setup needed | |
} | |
void loop() { | |
for (int i = 0; i <= 255; i++) { | |
analogWrite(PWMpin, i); | |
delay(20); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment