ok im using 2.0 code and i wan to know what do i have to change in the code and what to change it to if im using input 4 instead of input 2? Im doing this because some solder filled a hole in input 2 and now i cant get the solder out so instead im using input 4. If anyone can help that would be great. Thank you for dealing with my questions.
is this all
pinMode(13,OUTPUT);//LED pin
pinMode(6,OUTPUT); //Remove Before Fly ground
digitalWrite(6,LOW);
pinMode(2,INPUT);//Servo input -----------------------------------------------here
pinMode(3,INPUT);//Servo Input -----------------------------------------------------------or here
pinMode(4,INPUT); //MUX pin
pinMode(5,INPUT); //Mode pin
digitalWrite(7, HIGH); //Remove Before Fly Pull Up resistor
pinMode(7,INPUT); //Remove Before Fly input pin
Init_servos();
pulse_servos(0,0);
i think here to right?
byte Tx_Switch_Status(void) //Returns zero when we are in manual mode, returns 2 when autopilot mode 0, returns 3 when autopilot mode 1...
{
if(digitalRead(4)==HIGH)
{
if(digitalRead(5)==HIGH)
return 0x02; // WP mode
else
return 0x03; // RTL mode
}
else
return 0x00;
}
Tags:
Share
Facebook
-
▶ Reply to This