def other_sensor(): humidity = hdc.readHDC_humidity() logfile.write("\nHumidity = ") logfile.write(str(humidity)) temperature = hdc.readHDC_temp() logfile.write("\nTemperature = ") logfile.write(str(temperature)) pressure = lph.getPressure() logfile.write("\nPressure = ") logfile.write(str(pressure))
import sensor_init as s import time as t sen1 = '1' sen2 = '2' s1 = '' s2 = '' logfile = open('sensor_data.txt','w') #board addresses initialize board_addr = [b_eeprom.board1, b_eeprom.board2, b_eeprom.board3, b_eeprom.board4] print board_addr #other sensor configuration lph.configure() def other_sensor(): humidity = hdc.readHDC_humidity() logfile.write("\nHumidity = ") logfile.write(str(humidity)) temperature = hdc.readHDC_temp() logfile.write("\nTemperature = ") logfile.write(str(temperature)) pressure = lph.getPressure() logfile.write("\nPressure = ") logfile.write(str(pressure)) def reading_eeprom(boardAddr):
def met_sensors(self): humidity = hdc.readHDC_humidity() temperature = hdc.readHDC_temp() pressure = lph.getPressure() return temperature, humidity, pressure
def other_sensor(): humidity = hdc.readHDC_humidity() temperature = hdc.readHDC_temp() pressure = lph.getPressure()
import time import LPS25H as p bus = p.bus_init() p.p_init(bus) while(1): alt_out = p.p_get(bus) print str(alt_out) time.sleep(0.1)