Untitled
unknown
plain_text
a year ago
862 B
19
Indexable
/*
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
}Editor is loading...
Leave a Comment