Today, I will show you how to make Ambulance/Police Car Light With Arduino!
*** List Parts ***
- Arduino Nano (Or any board Arduino)
https://www.banggood.com/custlink/3GvEL7wuVK
https://www.banggood.com/custlink/3GvEL7wuVK
https://www.banggood.com/custlink/3GvEL7wuVK
https://www.banggood.com/custlink/3GvEL7wuVK
https://www.banggood.com/custlink/3GvEL7wuVK
Step 1: Disassemble the Car
I will disassemble the current car to check the status, the existing LED system
Step 2: Replace the Old LED System LED
Replace old 3mm LED system with 5mm LED (bigger, brighter)
Step 3: Connecting the Electrical System
Connect the electrical system according to the circuit diagram in the picture
Step 4: Reassemble
Reassemble the car as it was
Step 5: Programming and Running Tests
Upload the program for the Arduino board and run it.
/************************************
Ambulance Car LED
Author: GoldScrew
Website: https://goldscrew.blogspot.com/
Youtube: https://www.youtube.com/channel/UChwNQ-OqSZoVFFfEkylF2Uw
************************************/
int ledDelay = 50;
int redPin = 5;
int bluePin = 6;
void setup() {
pinMode(redPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
digitalWrite(redPin, HIGH);
delay(ledDelay);
digitalWrite(redPin, LOW);
delay(ledDelay);
digitalWrite(redPin, HIGH);
delay(ledDelay);
digitalWrite(redPin, LOW);
delay(ledDelay);
digitalWrite(redPin, HIGH);
delay(ledDelay);
digitalWrite(redPin, LOW);
delay(ledDelay);
delay(100);
digitalWrite(bluePin, HIGH);
delay(ledDelay);
digitalWrite(bluePin, LOW);
delay(ledDelay);
digitalWrite(bluePin, HIGH);
delay(ledDelay);
digitalWrite(bluePin, LOW);
delay(ledDelay);
digitalWrite(bluePin, HIGH);
delay(ledDelay);
digitalWrite(bluePin, LOW);
delay(ledDelay);
}
The two green and red lights will flash alternately.
So it's success!
0 Comments