Programming Examples

Arduino program to interface led buzzer with Arduino or raspberry pi and turn ON LED for 2 second after every 3 second




Arduino program to interface led/buzzer with Arduino /raspberry pi and turn ON LED for 2 second after every 3 second

// Pin connected to the LED
const int ledPin = 13;
void setup() {
  // Set the LED pin as an output
  pinMode(ledPin, OUTPUT);
}
void loop() {
  // Turn the LED ON
  digitalWrite(ledPin, HIGH);
  
  // Wait for 2 seconds
  delay(2000);
  
  // Turn the LED OFF
  digitalWrite(ledPin, LOW);
  
  // Wait for 3 second 
  delay(3000);
}
Output

CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad