[ create a new paste ] login | about

Link: http://codepad.org/biar3S0t    [ raw code | fork ]

Python, pasted on Oct 14:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
x = 1
while 1:
        humidity, temperature=Adafruit_DHT.read_retry(sensor, pin)
        lcd_send_byte(LCD_LINE_1, LCD_CMD)
        lcd_message("Temp:     {0:0.1f}\337C".format(temperature))

        lcd_send_byte(LCD_LINE_2, LCD_CMD)
        lcd_message("Humidity: {0:0.1f}%".format(humidity))
        time.sleep(5)
        x += 1

        while 2:
                lcd_send_byte(LCD_LINE_1, LCD_CMD)
                lcd_message("Temp: {0:0.1f}\337C".format(sensor.read_temperature()))

                lcd_send_byte(LCD_LINE_2, LCD_CMD)
                lcd_message("Druck: {0:0.0f} hPa".format(sensor.read_pressure()/100))
                time.sleep(5)
                x -= 1


Create a new paste based on this one


Comments: