M5 Stack SeriesのAtom LiteでUIFlowを使ってTVOC/eCO2を動かしてみました。

最初の初期設定までの流れはこちらをご確認ください。
設定が終わったら、Atom LiteにTVOC/eCO2をつないでPCへ接続します。

UIFlowにアクセスします。
※今回、言語は英語にしています。
なお、今回はverは変更せずにこのままで設定していきます。

まず、左下のUnitの+マークをクリックし、TVOC/eCO2を選択します。
ポートはAを使用しているので、今回はそのままにしておきます。


ブロックを用意して下記のように配置して、実行ボタン(▶Run)をクリックします。
なお、DocumentにはSet tvoc0 iaq baseline eC02 〇 TVOC 〇というブロックがあるのですが見つからず…。
参考にしたサイトによるとなくても時間がたてば取得できるとあったので、今回はなしでいきました。
M5 stickだとBurnでファームウェアを更新したらでできたというサイトもあったのですが、設定したの数日前なのでAtom Liteの場合は望みが薄いのかなと…。
・Event > Loop
・Text > Print
・Text > +のブロック
・Units > Get tvoc0 iaq baseline
・Units > Get tvoc0 Tvoc
・Units > Get tvoc0 baseline TVOC
・Units > Get tvoc0 eCO2
・Units > Get tvoc0 baseline eCO2
・Units > Get tvoc0 H2
・Units > Get tvoc0 Ethanol
・Timer > Wait 〇s

実行結果はTerminalをクリックしてリンクマークよりポートを選択すると確認することができます。



なお、Pythonのほうのコードは下記のようになっています。

参考にした記事
M5 STACK TVOC/eCO2 Document
Lang-ship M5Stack TVOC/eCO2 ガスセンサユニット(SGP30)
スイッチは男のロマン M5StackCで簡単CO2センサー
Comments