Using the Unit CatM ・ 使用 Unit CatM
M5StackのUnit CatMをコントローラーに接続する最小構成。配線とBOMつき。
この構成をエディタで開く・編集する →| 部品 | 役割 | ポート | リンク・価格 |
|---|---|---|---|
| M5Stack Core2 | Controller | grove_i2c, grove_analog, grove_uart, mbus | official page — $46.9 |
| Unit CatM | unit | grove_uart, antenna_sma, sim_card | official page |
M5Stack Core2とUnit CatMで作る、最小構成のCatM通信モジュールです。Unit CatMはSIM7080Gベースの国際版CatM/NB-IoTデュアルモード無線通信モジュールで、Grove UART(青ポート)経由でCore2と接続します。このガイドでは、配線から動作確認までの手順を説明します。
# M5Stack Core2 + Unit CatM (UART communication test)
# Wiring: Unit CatM -> Core2 blue Port.C (UART)
from machine import UART, Pin
from m5stack import lcd
import time
# Initialize UART on Port.C (TX=13, RX=14)
uart = UART(2, baudrate=115200, tx=13, rx=14)
def send_at(cmd, timeout=2000):
uart.write(cmd + '\r\n')
time.sleep_ms(100)
buf = uart.read()
if buf:
return buf.decode('utf-8').strip()
else:
return ''
lcd.clear()
lcd.print('CatM Test', 10, 20)
time.sleep(1)
# Test basic AT communication
response = send_at('AT')
lcd.print('AT: ' + response, 10, 50)
time.sleep(1)
# Check signal quality
response = send_at('AT+CSQ')
lcd.print('CSQ: ' + response, 10, 80)
while True:
time.sleep(5)
response = send_at('AT+CSQ')
lcd.clear()
lcd.print('CatM Test', 10, 20)
lcd.print('CSQ: ' + response, 10, 50)
この作り方はAIが構成から生成したものです(未検証)。通電前に配線とコードをご確認ください。
この構成はAIが実在するM5Stack部品から設計し、ポート互換をサーバで検証したものです。編集・共有できます。
エディタで開く →UnitKit は M5Stack® 製品向けの非公式ツール。作りたいものを書くと、部品リストと配線図が出ます。