From aff39df39db30502e03297d5754857b21e1a8455 Mon Sep 17 00:00:00 2001 From: sowgro Date: Tue, 30 Sep 2025 15:30:46 -0400 Subject: activity6 --- project/Core/Src/Activties/activity7.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 project/Core/Src/Activties/activity7.c (limited to 'project/Core/Src/Activties') diff --git a/project/Core/Src/Activties/activity7.c b/project/Core/Src/Activties/activity7.c new file mode 100644 index 0000000..2ffc9e8 --- /dev/null +++ b/project/Core/Src/Activties/activity7.c @@ -0,0 +1,26 @@ +/* + * activity7.c + * + * Created on: Sep 30, 2025 + * Author: sowgro + */ + +#include "LED.h" +#include "UART.h" +#include + +void activity7_run() { + for(;;) { + uint8_t ch = USART_Read(USART2); + printf("%c", ch); + if (ch == '\r') { + printf("\n"); + } + if (ch == '0') { + LED_On(); + } + if (ch == 'f') { + LED_Off(); + } + } +} -- cgit v1.2.3