#include <LiquidCrystal.h>
// Initialize the LCD library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //RS, E, D4, D5, D6, D7
int buzzerPin = 6;
int ledPin1 = 7;
int ledPin2 = 8;
void setup() {
lcd.begin(16, 2); // Set up the LCD's number of columns and rows
pinMode(buzzerPin, OUTPUT);
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
lcd.print("Ambulance Go "); // Print a message on the LCD
}
void loop() {
digitalWrite(ledPin1, HIGH); // Turn on LED 1
digitalWrite(ledPin2, LOW); // Turn off LED 2
tone(buzzerPin, 1000); // Play high pitch sound
lcd.setCursor(0, 1); // Set the cursor to the second row
lcd.print("Weeeee"); // Print a message on the LCD
delay(500); // Wait for 0.5 second
noTone(buzzerPin); // Stop the sound
digitalWrite(ledPin1, LOW); // Turn off LED 1
digitalWrite(ledPin2, HIGH); // Turn on LED 2
tone(buzzerPin, 500); // Play low pitch sound
lcd.setCursor(0, 1); // Set the cursor to the second row
lcd.print("Wooooo"); // Print a message on the LCD
delay(500); // Wait for 0.5 second
noTone(buzzerPin); // Stop the sound
}