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); + } } }