SHT15

  
  THREAD(update_temp)
        TTY_SELECT(temp)
        TTY_HOME()

        ON (CLOCK_SEC % 10) == 0 DO
            TEMP_INT = ONEWIRE_GET(10e2ce7001080049);
            TTY_WRITE(`"%2d,%d?C "', TEMP_INT / 10, TEMP_INT % 10)
        END

        ON (CLOCK_SEC % 10) == 3 DO
            HUMID = SHT_GET_HUMID();
            TTY_WRITE(`"%2d,%d%%rF"', HUMID / 10, HUMID % 10)
            UESEND(44.128.91.225, "c6 set HUMID %d%d\n", HUMID / 10, HUMID % 10);
        END

        ON (CLOCK_SEC % 10) == 6 DO
            TEMP_EXT = SHT_GET_TEMP();
            TTY_WRITE(`"%2d,%d?C "', TEMP_EXT / 100, TEMP_EXT % 100)
            UESEND(44.128.91.225, "c6 set TEMP_EXT %d%d\n", TEMP_EXT / 100, TEMP_EXT % 100);
        END

        ON (CLOCK_SEC % 10) == 8 DO
            dnl int32_t Druck = CALC_DRUCK(ADCWert);
            DRUCK = ADS7822_GET(9);
            TTY_WRITE(`"%4d   "', DRUCK)
            UESEND(44.128.91.225, "c6 set DRUCK %4d \n", DRUCK);
        END

        WAIT(1)
    THREAD_END(update_temp