/* This file is part of the Simba project.  */
int main()
/* This file is part of the Simba project.  */
int main()
{
    int res;
    struct dht_driver_t dht;
    float temperature;
    float humidty;
    sys_start();
    dht_module_init();
    dht_init(&dht, &pin_d2_dev);
    while (1) {
        thrd_sleep(2.5);
        res = dht_read(&dht, &temperature, &humidty);
        if (res != 0) {
            std_printf(OSTR("Read failed with %d: %S.\r\n"),
                       res,
                       errno_as_string(res));
            continue;
        }
        std_printf(OSTR("Temperature: %f C\r\n"
                        "Humidty:     %f %%RH\r\n"
                        "\r\n"),
                   temperature,
                   humidty);
    }
    return (0);
}