From 7b459214c8c8b918d616c02166ce6eeb7c9fd9e1 Mon Sep 17 00:00:00 2001 From: NaifBanana <30419422+NaifBanana@users.noreply.github.com> Date: Wed, 21 Oct 2026 15:32:35 -0500 Subject: [PATCH] Recognizes and processes commands --- Talky/main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Talky/main.c b/Talky/main.c index f2b790a..00446ab 100644 --- a/Talky/main.c +++ b/Talky/main.c @@ -9,7 +9,7 @@ char NULLCHAR = 0x0; QueueHandle_t MESSAGES = NULL; - +bool LIGHT = false; void vReadSerial(void* params) { // Setup @@ -64,8 +64,13 @@ void vProcessMessages(void* params) { char* command = pvPortMalloc(BUFFER_SIZE * sizeof(char)); while(MESSAGES != NULL) { if (xQueueReceive(MESSAGES, command, 50)) { - printf("Recieved message: "); - printf("%s\n", command); + if (strcmp("blink", command)) { + printf("Recieved message: "); + printf("%s\n", command); + } else { + LIGHT = !LIGHT; + gpio_put(PICO_DEFAULT_LED_PIN, LIGHT); + } } }