#include <stdio.h>
#include "pico/stdlib.h"

#include "vacum.hpp"

#include "FreeRTOSConfig.h"
#include "FreeRTOS.h"
#include "task.h"

void vTaskFunction(void *pvParameters) {
    while (true) {
        printf("Button: %d\n", gpio_get(BUTTON_PIN));
        vTaskDelay(pdMS_TO_TICKS(1000));
    }
}

int main() {
    stdio_init_all();
    printf("Hello, world!\n");

    VacumControl vacumControl;
    vacumControl.setState(false);
    
    xTaskCreate(vTaskFunction, "Main Task", 1024, NULL, tskIDLE_PRIORITY, NULL);
    vTaskStartScheduler();

    while (true) {
        tight_loop_contents();
    }
}
