Skip to content

A simple police siren simulation with arduino microcontroller

Notifications You must be signed in to change notification settings

Mustapha7018/Police-Siren

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Arduino Police Siren Project

This is a simple Arduino project that simulates a police siren using an Arduino board. The project uses three components: a red LED, a blue LED, and a piezo buzzer. When the code is uploaded to the Arduino, it creates a siren effect by alternating between the red and blue LEDs while generating a siren sound with the piezo buzzer.

Components Used

  • Red LED: Connected to digital pin 8 (redLED).
  • Blue LED: Connected to digital pin 7 (blueLED).
  • Piezo Buzzer: Connected to digital pin 6 (buzzerPin).

Installation and Setup

  1. Make sure you have the Arduino IDE installed on your computer.
  2. Open the Arduino IDE and create a new sketch.
  3. Copy and paste the provided Arduino code into your sketch.
  4. Connect the components to the specified digital pins on your Arduino board.
  5. Verify and upload the sketch to your Arduino board.

Wiring Instructions

  • Red LED: Connect the longer leg (anode) to pin 8 and the shorter leg (cathode) to ground through a current-limiting resistor.
  • Blue LED: Connect the longer leg (anode) to pin 7 and the shorter leg (cathode) to ground through a current-limiting resistor.
  • Piezo Buzzer: Connect one terminal to pin 6 and the other terminal to ground.

Usage

After uploading the code and making the necessary connections, the Arduino will run the police siren simulation. The red and blue LEDs will alternate between on and off states, creating a flashing effect, while the piezo buzzer generates a siren sound.

Thinkacad Link

https://www.tinkercad.com/things/3pet8bKboqO

Image

image

About

A simple police siren simulation with arduino microcontroller

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages