Add Serial logging to simple blink sketch
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -1,15 +1,19 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(9600);
|
||||
while (!Serial) {
|
||||
delay(100);
|
||||
}
|
||||
Serial.println("Starting");
|
||||
pinMode(2,OUTPUT);
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
digitalWrite(2,HIGH);
|
||||
Serial.println("ON");
|
||||
sleep(1);
|
||||
digitalWrite(2,LOW);
|
||||
Serial.println("OFF");
|
||||
sleep(1);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user