Skip to content

PID-26 環境感測器 ​

宣告實例 ​

把 PID-26 環境感測器(PID26) 積木新增到工作區後,Python 程式碼中會自動插入下面這樣的實例宣告:

python
cheesestick = CheeseStick(0)
pid26 = cheesestick.PID26()

參數 ​

名稱類別說明範圍 / 種類預設值
index下拉選項實例編號(從 0 開始)0 以上的整數0

啟動 ​

開始使用 PID-26 環境感測器。

start

參數 ​

(無)

Python ​

python
cheesestick = CheeseStick(0)
pid26 = cheesestick.PID26()

pid26.start()

溫度 (°C) ​

回傳 PID26 環境感測器測得的溫度值。

temperature

參數 ​

(無)

Python ​

python
cheesestick = CheeseStick(0)
pid26 = cheesestick.PID26()

pid26.temperature()

濕度 (%RH) ​

回傳 PID26 環境感測器測得的濕度值。

humidity

參數 ​

(無)

Python ​

python
cheesestick = CheeseStick(0)
pid26 = cheesestick.PID26()

pid26.humidity()

氣壓 (hPa) ​

回傳 PID26 環境感測器測得的氣壓值。

pressure

參數 ​

(無)

Python ​

python
cheesestick = CheeseStick(0)
pid26 = cheesestick.PID26()

pid26.pressure()