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

Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2025 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz