#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <string>
#include "input.h"

unsigned char US[] = {0x1F};
unsigned char STX[] = {0x02};
unsigned char ETX[] = {0x03};

int main() {
    int fd = open("/dev/ttyUSB0", O_RDWR);
    for (int i = 0; i < sizeof(random_levels)/sizeof(random_levels[0]); i++)
    {
        std::string i_str = std::to_string(random_levels[i]);
        write(fd, i_str.c_str(), sizeof(i_str.c_str()));
        printf("uart_sender: DATA SENT: %s\n", i_str.c_str());
        sleep(1);
    }

    return 0;
}
