Hi guys!
On monday ingut my glue and other things for the Dc3.
I bought superglue, a servotester, a bunch of hinges and GFK rudderhorns.
Next i went to the computer and write a progam for my Arduino.
I don´t want to buy a lightsytem for 50 bucks and one LED for 5 bucks! (MultiLight)
An Arduino is much cheaper and you can do much more things with it.
The arduino is now comparing the PWM from the RX with a kind of number for this PWM ratio.
For mode information click
HERE.
The whole program is:
byte rx = 11;
int a = 12;
int b = 13;
int rx2;
int rot = 2;
int gruen = 3;
int blitz = 4;
int llR = 5;
int llL = 6;
void setup() {
// put your setup code here, to run once:
pinMode(rx, INPUT);
Serial.begin(115200);
pinMode(rot, OUTPUT);
pinMode(gruen, OUTPUT);
pinMode(blitz, OUTPUT);
pinMode(llR, OUTPUT);
pinMode(llL, OUTPUT);
pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
rx2 = pulseIn(rx, HIGH);
Serial.println(rx2);
digitalWrite(a, HIGH);
digitalWrite(b, LOW);
if(rx2 < 1000){
digitalWrite(llR, HIGH);
digitalWrite(llL, HIGH);
digitalWrite(rot, HIGH);
digitalWrite(gruen, HIGH);
digitalWrite(blitz, LOW);
delay(1000);
digitalWrite(blitz, HIGH);
delay(100);
digitalWrite(blitz, LOW);
}
else{
digitalWrite(rot, LOW);
digitalWrite(gruen, LOW);
digitalWrite(blitz, LOW);
digitalWrite(llR, LOW);
digitalWrite(llL, LOW);
}
}
If you have a Arduino you can copy it into your programing window!
a and b are provision pins for the RX, gruen means green, rot means red and blitz means flash.
llR and llL means landinglights right and left.
And rx is the input pin for the signalwire from the reciver.
Next i made the wingconnection because i don´t want to change the flaps with the ailerons when i build it up.
Then i put the servoplugs into one of these little bags, which you have in a mass if you build RC planes.
I have to go to school now so i´ll continue this post in the evening!
Bye!
Jetcrafter2000