mirror of
https://github.com/DashyFox/StackSport.git
synced 2025-06-28 13:19:41 +00:00
release
This commit is contained in:
@ -35,3 +35,16 @@ void SetServo(uint8_t channel, uint8_t angel)
|
||||
HAL_I2C_Master_Transmit(&hi2c1, (PCA9685_ADRESS << 1), bufer, 5, 10);
|
||||
}
|
||||
|
||||
void SetServoOFF(uint8_t channel)
|
||||
{
|
||||
uint8_t bufer[5];
|
||||
|
||||
bufer[0] = 6 + channel*4; //channel register adress
|
||||
bufer[1] = 0; //start time for "on" Lowbyte (0..4095)
|
||||
bufer[2] = 0; //start time for "on" HIbyte
|
||||
bufer[3] = 0&0xFF; //start time for "off" Lowbyte (0..4095)
|
||||
bufer[4] = 0>>8;; //start time for "off" HIbyte
|
||||
|
||||
HAL_I2C_Master_Transmit(&hi2c1, (PCA9685_ADRESS << 1), bufer, 5, 10);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user