Last active
November 13, 2020 09:12
-
-
Save einarpersson/093594485e8e878547bc54035e5d1999 to your computer and use it in GitHub Desktop.
Sample of Arduino code for lesson 2020-11-13
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 duration = 200; | |
int blueLedPin = LED_BUILTIN; | |
int count = 0; | |
void blink() { | |
digitalWrite(blueLedPin, HIGH); | |
delay(duration); | |
digitalWrite(blueLedPin, LOW); | |
delay(duration); | |
} | |
void setup() { | |
pinMode(blueLedPin, OUTPUT); | |
Serial.begin(9600); | |
} | |
void loop() { | |
Serial.print(count); | |
blink(); | |
delay(2000); | |
count = count + 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment