|
在 def.h 里面,如:
// D12(PB4) -> D4(PD4)
#define SERVO_4_PINMODE pinMode(4,OUTPUT); // new - alt TILT_ROLL
#define SERVO_4_PIN_HIGH PORTD |= 1<<4;
#define SERVO_4_PIN_LOW PORTD &= ~(1<<4);
// D11(PB3) -> D5(PD5)
#define SERVO_5_PINMODE pinMode(5,OUTPUT); // BI LEFT
#define SERVO_5_PIN_HIGH PORTD |= 1<<5;
#define SERVO_5_PIN_LOW PORTD &= ~(1<<5);
// D3
#define SERVO_6_PINMODE pinMode(3,OUTPUT); // TRI REAR - BI RIGHT
#define SERVO_6_PIN_HIGH PORTD|= 1<<3;
#define SERVO_6_PIN_LOW PORTD &= ~(1<<3);
// D10
#define SERVO_7_PINMODE pinMode(10,OUTPUT); // new
#define SERVO_7_PIN_HIGH PORTB |= 1<<2;
#define SERVO_7_PIN_LOW PORTB &= ~(1<<2);
// D9
#define SERVO_8_PINMODE pinMode(9,OUTPUT); // new
#define SERVO_8_PIN_HIGH PORTB |= 1<<1;
#define SERVO_8_PIN_LOW PORTB &= ~(1<<1);
|
|