pwm uart gpio i2c
This commit is contained in:
9
empty.c
9
empty.c
@@ -36,12 +36,14 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <pwm.h>
|
||||
|
||||
extern float angle_f;
|
||||
|
||||
const float num_f = 0.123456f;
|
||||
|
||||
volatile uint16_t count = 0 ;
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
@@ -55,6 +57,11 @@ int main(void)
|
||||
volatile float angle_rad = GetAngle();
|
||||
//printf("test \n");
|
||||
printf("angle %.5f \n" , angle_rad);
|
||||
|
||||
PWM_Channel1(count ++);
|
||||
if(count == 750)
|
||||
count = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user