diff --git a/SHT31.py b/SHT31.py deleted file mode 100644 index 083c6bf..0000000 --- a/SHT31.py +++ /dev/null @@ -1,61 +0,0 @@ -<<<<<<< HEAD -#-------------------SHT31------------------------------------------------------- -#| Time | Version | Contribution | Comment -#| 2017.6.22| 0 | fork form http://www.pibits.net/code/raspberry-pi-sht31-sensor-example.php -#| 2017.6.24 | 1 | H.F. | Work :) -#------------------------------------------------------------------------------- -import smbus -import time - -======= -#-------------------SHT31------------------------------- -#| Time | Version | Contribution | Comment 2017.6.22| 0 | fork form -#| http://www.pibits.net/code/raspberry-pi-sht31-sensor-example.php -#| 2017.6.24 | 1 | H.F. | Work :) -#--------------------------------------------------------------- -import smbus ->>>>>>> 7603f355e9a24e3d2c17c49d3f6cb6d84f6e6163 - -import time -# Get I2C bus -bus = smbus.SMBus(1) -time0=time.strftime("%Y%m%d%H%M",time.localtime()) -datestore='/home/pi/Desktop/SHT/'+'SHT'+time0+'.txt' ticks0=time.time() -while True: - # SHT31 address, 0x44(68) - bus.write_i2c_block_data(0x44, 0x2C, [0x06]) - time.sleep(0.5) - - # SHT31 address, 0x44(68) Read data back from 0x00(00), 6 bytes - # Temp MSB, Temp LSB, Temp CRC, Humididty MSB, Humidity LSB, - # Humidity CRC - - data = bus.read_i2c_block_data(0x44, 0x00, 6) - # Convert the data - temp = data[0] * 256 + data[1] - cTemp = -45 + (175 * temp / 65535.0) - humidity = 100 * (data[3] * 256 + data[4]) / 65535.0 - ticks = time.time() - # Output data to screen - print("%.2f "%(ticks-ticks0)+"Temp%.2f "%cTemp+"RH%.2f"%humidity) - try: - record = open(datestore, 'a') - record.write(str(ticks)+",") - record.write(str(cTemp)+",") - record.write(str(humidity)+","+"\n") - finally: - if record: - record.close() - # http://www.pibits.net/wp-content/uploads/2016/11/pi-and-sht31_bb.png - -<<<<<<< HEAD -try: - record = open('/home/pi/Desktop/SHT31.txt', 'a') - record.write(str(ticks)+",") - record.write(str(cTemp)+",") - record.write(str(humidity)+","+"\n") -finally: - if record: - record.close() -======= ->>>>>>> 7603f355e9a24e3d2c17c49d3f6cb6d84f6e6163 diff --git a/lanuch.py b/lanuch.py index abc386d..c010a77 100644 --- a/lanuch.py +++ b/lanuch.py @@ -43,7 +43,7 @@ p_box3bot = multiprocessing.Process(target = box3bot.record, args = ()) #p_env = multiprocessing.Process(target = env.record, args = ()) p_PC30 = multiprocessing.Process(target = PC30.record, args = ()) - p_PC60 = multiprocessing.Process(target = PC60.record, args = ()) + p_PC60 = multiprocessing.Process(target = PC60.record, args = ()) p_box1top.start() p_box1bot.start() @@ -54,7 +54,7 @@ #p_env.start() p_PC30.start() p_PC60.start() - + ############## To Do: Pool ############################ # p = Pool(4) diff --git a/launch.py b/launch.py deleted file mode 100644 index f54b4a3..0000000 --- a/launch.py +++ /dev/null @@ -1,8 +0,0 @@ -############################################################################### -# -# -# -############################################################################### - -for i=1:100 - SHT31.py