04/15/2024

How To Make Navigation Light System For RC Airplane.

Navigation Lighting System For RC Airplane. Diy RC Light System.

Necessary materials:

Arduino Pro Micro: https://s.click.aliexpress.com/e/_DdTIVk9
5×5 PCB board: https://s.click.aliexpress.com/e/_Dd5hGJR
5050 White SMD Led (x4), 5050 Green SMD Led, 5050 Red SMD Led (x2):
https://s.click.aliexpress.com/e/_Dl0J8O9
White Power Led 1 Watt: https://s.click.aliexpress.com/e/_DFnFPLF
Power Led Lens 45° or 60 : https://s.click.aliexpress.com/e/_DmwVV21
5050 Led lens (x7) :  https://s.click.aliexpress.com/e/_De42zCH   OR  https://s.click.aliexpress.com/e/_Dlv0VPT
BD139 NPN Transistor (x3): https://s.click.aliexpress.com/e/_DlOZZ7T
1K resistor (x3): https://s.click.aliexpress.com/e/_DBTHOdj
100R 1/2 Watt resistor: https://s.click.aliexpress.com/e/_DDQeh05
68R 1/2 or 1 Watt resistor: https://s.click.aliexpress.com/e/_DDQeh05
33R,  10R 2Watt resistor: https://s.click.aliexpress.com/e/_DF41sxX
Servo cable (x4): https://s.click.aliexpress.com/e/_DDFCHiD
JST 2 Pin connector & Cable : https://s.click.aliexpress.com/e/_DdLfP9f

 

int SIGNAL; 
 
 void setup(){

 pinMode(21, INPUT); // Aux Channel (CH3 or CH4)
 pinMode(3, OUTPUT); // Blinking Lights
 pinMode(5, OUTPUT); // Landing Lights
 pinMode(9, OUTPUT); // Constant Lights
 
 }
 void loop(){

SIGNAL=pulseIn(21,HIGH);

digitalWrite(9, LOW);
digitalWrite(3, LOW);
digitalWrite(5, LOW);

if (SIGNAL>1400)
{
  digitalWrite(3, HIGH);
  digitalWrite(5, LOW);
  
for (int i = 0; i< 1250; i++) {
if (SIGNAL>1800) digitalWrite(9, HIGH); else digitalWrite(9, LOW);
delay(1);
}

  digitalWrite(5, HIGH);
  delay(95);
  digitalWrite(5, LOW);
  delay(95);
  digitalWrite(5, HIGH);
  
}
else
{
 digitalWrite(3, LOW);
 digitalWrite(5, LOW);
}
}