From 60944f55dded40b500406d91d1af8433bd6fe02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jasper=20G=C3=BCldenstein?= Date: Fri, 13 Nov 2020 12:55:18 +0100 Subject: [PATCH] main testing function for pwm input and output --- keil_project/Src/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keil_project/Src/main.c b/keil_project/Src/main.c index 3af9fa4..13bbf9e 100644 --- a/keil_project/Src/main.c +++ b/keil_project/Src/main.c @@ -24,6 +24,7 @@ #include "RFInput.h" #include "IncrEncoder.h" #include "DcMotor.h" +#include "Sail.h" void SystemClock_Config(void); @@ -45,18 +46,18 @@ int main(void) SystemClock_Config(); RF_INPUT_Init(); - LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOA); - LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM4); DC_MOTOR_Init(); + SAIL_Init(); /* Infinite loop */ while (1) { - LL_mDelay(1000); + LL_mDelay(10); counter = (counter + 1) % 100; DC_MOTOR_SetSpeed(counter); val = RF_INPUT_GetValue1(); val2 = RF_INPUT_GetValue2(); + SAIL_SetAngle(counter); } }