Untitled
unknown
plain_text
13 days ago
862 B
10
Indexable
Never
/* Created on 1st September 2024 for Short Term Course on IoT and Data Analytics */ #define LEDPIN 13 // the setup function runs once when you press reset or power the board void setup() { // Start the serial communication Serial.begin(9600); // initialize digital pin LEDPIN as an output. pinMode(LEDPIN, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(LEDPIN, HIGH); // turn the LED on (HIGH is the voltage level) Serial.println("LED is ON"); //print to the serial port that the LED is ON delay(100); // wait for a 100 miliseconds digitalWrite(LEDPIN, LOW); // turn the LED off by making the voltage LOW Serial.println("LED is OFF"); //print to the serial port that the LED is ON delay(100); // wait for 100 miliseconds }
Leave a Comment