diff options
Diffstat (limited to 'project/Core/Src/Activties/activity7.c')
| -rw-r--r-- | project/Core/Src/Activties/activity7.c | 26 |
1 files changed, 26 insertions, 0 deletions
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 <stdio.h> + +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(); + } + } +} |
