Using the Module Gateway H2 ・ 使用 Module Gateway H2
M5StackのModule Gateway H2をコントローラーに接続する最小構成。配線とBOMつき。
この構成をエディタで開く・編集する →| 部品 | 役割 | ポート | リンク・価格 |
|---|---|---|---|
| M5Stack Core2 | Controller | grove_i2c, grove_analog, grove_uart, mbus | official page — $46.9 |
| Module Gateway H2 | module | mbus, gpio, uart, spi | official page — $6.5 |
M5Stack Core2とModule Gateway H2をM-Busで接続し、Zigbee/Thread/Matter対応のスマートホームゲートウェイを構築します。Module Gateway H2はCore2の底面に直接スタックするだけで配線不要。このガイドでは、スタック方法と動作確認用のMicroPythonコードを紹介します。
# M5Stack Core2 + Module Gateway H2 (M-Bus stack)
# Wiring: Module Gateway H2 stacked on Core2 via M-Bus (no cables)
# This code initializes the module and prints a ready message.
import time
from machine import Pin
from m5stack import lcd
# Module Gateway H2 uses UART on M-Bus (pins 13/14 on Core2)
# We just check if the module is powered (M-Bus provides 3.3V)
# For a real gateway, you would use the UART to communicate.
lcd.clear()
lcd.print('Module Gateway H2', 10, 20)
lcd.print('Ready', 10, 50)
print('Module Gateway H2 Ready')
# Optional: blink a LED on Core2 to show it's alive
led = Pin(2, Pin.OUT)
for _ in range(3):
led.on()
time.sleep(0.2)
led.off()
time.sleep(0.2)
# Keep running
while True:
time.sleep(1)
この作り方はAIが構成から生成したものです(未検証)。通電前に配線とコードをご確認ください。
この構成はAIが実在するM5Stack部品から設計し、ポート互換をサーバで検証したものです。編集・共有できます。
エディタで開く →UnitKit は M5Stack® 製品向けの非公式ツール。作りたいものを書くと、部品リストと配線図が出ます。