ARDUINO AIRPLANE LIGHTS
INTRODUCTION
This
is an Arduino DIY project intended to simulate airplane lights. Airplanes are
detectable in the night sky solely because of their lights. Most airplanes have
three lights, one at the bottom and other on edge of each wing. The most common
configuration is one red light at the bottom and two white lights on the wing.
COMPONENTS REQUIRED
1. Breadboard
2. Arduino
UNO
3. One
5mm Red LED
4. Two
5mm White LED’s
5. Three
20 Ohm resistors
6. Breadboard jumpers (wires)
CIRCUIT SCHEMATICS
Make
the appropriate connections as shown in the schematic above
CODE
This
is the code for simulating Arduino Airplane lights. Copy and paste the code in
Arduino IDE sketch area. Note that the values and choice of ports can always be
changed.
void setup() {
// put your setup
code here, to run once:
pinMode(4, OUTPUT); //Red LED
pinMode(7, OUTPUT); //White LED
pinMode(8, OUTPUT); //White LED
}
void loop() {
// put your main
code here, to run repeatedly:
digitalWrite (4, HIGH);
delay(500);
digitalWrite(4, LOW);
delay(200);
digitalWrite (7, HIGH);
digitalWrite (8, HIGH);
delay(100);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
delay(300);
}
No comments:
Post a Comment