pwm uart gpio i2c

This commit is contained in:
2025-11-12 19:44:11 +08:00
parent 8908bf2332
commit 4dc04bdd7e
3 changed files with 20 additions and 3 deletions

View File

@@ -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;
}
}