object_page http://www.yama-lab.org/fwb4pi/index.php?work20240902-01 or   http://www.yama-lab.org/fwb4pi/index.php?work20240902-01
device yamaRasPiDp9_1 or yamaRasPiDp9_2 start after no write for 10 min.
command: set read_interval=60000
command: set exec_interval=0
command: set report_length=100
command: py test
py; #
py: #from machine import Pin, I2C
py: import smbus2
py: import time
py: from bme280 import BME280
py: #i2c = smbus.SMBus(1)
py: #i2c= I2C(0, sda=Pin(0), scl=Pin(1), freq = 10000)
py: bme=BME280(i2c_address=0x76)
py: v=(bme.get())[1]
py: line="device=temp, Date="+self.Pico_Time.get_now()+", v="+str(v)
py: self.write_line(line)
py: v=self.ex_pico("ex self.sensing.get_motion()")
py: line="device=motion, Date="+self.Pico_Time.get_now()+", v="+str(v)
py: self.write_line(line)
py: v=self.ex_pico("ex self.sensing.get_co2()")
py: line="device=co2, Date="+self.Pico_Time.get_now()+", v="+str(v)
py: self.write_line(line)
py: v=self.ex_pico("ex self.sensing.get_lx()")
py: line="device=lx, Date="+self.Pico_Time.get_now()+", v="+str(v)
py: self.write_line(line)
py: v=self.ex_pico("ex self.sensing.get_pressure()")
py: line="device=pressure, Date="+self.Pico_Time.get_now()+", v="+str(v)
py: self.write_line(line)
py: self.send_result()
command: end test
command: run test
result:
device=temp, Date=2024/10/04 10:39:40, v=1014.5481185854505
device=motion, Date=2024/10/04 10:39:41, v=100
device=temp, Date=2024/10/04 10:40:00, v=1014.5077208382412
device=motion, Date=2024/10/04 10:40:01, v=100
device=temp, Date=2024/10/04 10:40:20, v=1014.5029888678525
device=motion, Date=2024/10/04 10:40:21, v=100
device=temp, Date=2024/10/04 10:40:45, v=1014.5113963982346
device=motion, Date=2024/10/04 10:40:46, v=100
device=temp, Date=2024/10/04 10:41:00, v=1014.4929567590599
device=motion, Date=2024/10/04 10:41:01, v=100
device=temp, Date=2024/10/04 10:50:08, v=26.55503493712006
device=motion, Date=2024/10/04 10:50:09, v=100
device=co2, Date=2024/10/04 10:50:10, v=615
device=lx, Date=2024/10/04 10:50:11, v=848
device=pressure, Date=2024/10/04 10:50:13, v=1014.23hPa
current_device="yama_bot_0000_0000_0000_0001". Date=2024/10/04 10:50:18

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS