05/09/2021

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://www.banggood.com/custlink/mvDRLVMN8q
5×5 PCB board: https://www.banggood.com/custlink/mmKEIObyOR
5050 White SMD Led (x4), 5050 Green SMD Led, 5050 Red SMD Led (x2):
https://www.banggood.com/custlink/vGvhoVkNBb
White Power Led 1 Watt: https://bit.ly/3n7xpJs
Power Led Lens 45° or 60 : https://www.banggood.com/custlink/mK3YO5ksQC
5050 Led lens (x7) : https://bit.ly/3egywCy or https://bit.ly/3gqBcQM
BD139 NPN Transistor (x3): http://bit.ly/3jpaCHb
1K resistor (x3): https://www.banggood.com/custlink/m3DySaARUA
100R 1/2 Watt resistor: https://bit.ly/3aqZu9e
68R 1/2 or 1 Watt resistor: https://www.banggood.com/custlink/D3KYj5knoB
10R 2Watt resistor: https://bit.ly/3sxKYCL
33R 1W or 2W resistor: https://bit.ly/2QGhV2K
Servo cable (x4): https://www.banggood.com/custlink/mv3yLVzn2d
JST 2 Pin connector : https://www.banggood.com/custlink/3GmhoPknnT

 

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);
}
}