if (config.BMP280_Present): bmpTemp = bmp280.read_temperature() TempF = bmpTemp* (9.0/5.0) +32.0 print 'Temperature = \t{0:0.2f} F'.format(TempF) #print 'Temperature = \t{0:0.2f} C'.format(bmp280.read_temperature()) print 'Pressure = \t{0:0.2f} KPa'.format(bmp280.read_pressure()/1000) print 'Altitude = \t{0:0.2f} m'.format(bmp280.read_altitude()) print 'Sealevel Pressure = \t{0:0.2f} KPa'.format(bmp280.read_sealevel_pressure()/1000) if (config.OLED_Present): Scroll_SSD1306.addLineOLED(display, 'Press= \t{0:0.2f} KPa'.format(bmp280.read_pressure()/1000)) if (config.HTU21DF_Present == False): Scroll_SSD1306.addLineOLED(display, 'InTemp= \t{0:0.2f} C'.format(bmp280.read_temperature())) print "----------------- " print "----------------- " if (config.HTU21DF_Present == True): print " HTU21DF Temp/Hum" else: print " HTU21DF Temp/Hum Not Present" print "----------------I guess that the other conversion text will used the same coding, just reference different formulas.
Mathematical Conversion Scripts for Weather Station
Users browsing this thread: 2 Guest(s)