xyControl
0.1
Quadrotor Flight Controller on AVR Basis
|
Controlling four BL-Ctrl V1.2 Brushless controllers. More...
Files | |
file | motor.h |
BL-Ctrl V1.2 Controller API Header. | |
file | motor.c |
BL-Ctrl V1.2 Controller API Implementation. | |
Functions | |
void | motorInit (void) |
Initializes the motor control library. More... | |
void | motorSet (uint8_t id, uint8_t speed) |
Set the speed of one or all motors. More... | |
void | motorTask (void) |
Send the values stored in motorSpeed to the Controllers. More... | |
Variables | |
uint8_t | motorSpeed [MOTORCOUNT] |
Speed for the four motors. More... | |
uint8_t | motorSpeed [MOTORCOUNT] |
Speed for the four motors. More... | |
Controlling four BL-Ctrl V1.2 Brushless controllers.
void motorInit | ( | void | ) |
Initializes the motor control library.
Really only sets motorSpeed to zero.
Definition at line 58 of file motor.c.
References MOTORCOUNT, and motorSpeed.
void motorSet | ( | uint8_t | id, |
uint8_t | speed | ||
) |
Set the speed of one or all motors.
id | Motor ID (0 to 3, 4 = all) |
speed | New Speed |
Definition at line 64 of file motor.c.
References MOTORCOUNT, and motorSpeed.
Referenced by setMotorSpeeds().
void motorTask | ( | void | ) |
Send the values stored in motorSpeed to the Controllers.
I2C already has to be initialized!
Definition at line 50 of file motor.c.
References MOTOR_BASEADDRESS, MOTORCOUNT, motorSpeed, TWI_WRITE, twiStart(), twiStop(), and twiWrite().
uint8_t motorSpeed[MOTORCOUNT] |
Speed for the four motors.
Definition at line 48 of file motor.c.
Referenced by motorInit(), motorSet(), and motorTask().
uint8_t motorSpeed[MOTORCOUNT] |
Speed for the four motors.
Definition at line 48 of file motor.c.
Referenced by motorInit(), motorSet(), and motorTask().