Using the Unit LoRaE220-920 ・ 使用 Unit LoRaE220-920
M5StackのUnit LoRaE220-920をコントローラーに接続する最小構成。配線とBOMつき。
この構成をエディタで開く・編集する →| 部品 | 役割 | ポート | リンク・価格 |
|---|---|---|---|
| ATOM Lite | Controller | grove_i2c, i2c, gpio | official page — $7.5 |
| Unit LoRaE220-920 | unit | grove_uart | official page — $33 |
ATOM LiteとUnit LoRaE220-920を接続して、920MHz帯でLoRa通信を行うための最小構成の配線ガイドです。シリアル通信(UART)を使って、ATOM LiteからLoRaユニットを制御します。
# ATOM Lite + Unit LoRaE220-920 (UART)
# Wiring: Unit LoRaE220-920 -> ATOM Lite Grove Port.C (UART)
# ATOM Lite Grove Port.C uses pins: TX=GPIO22, RX=GPIO19
from machine import UART, Pin
import time
# Initialize UART on Port.C (TX=22, RX=19)
uart = UART(2, baudrate=9600, tx=22, rx=19)
# Initialize LoRa module (example: set address and channel)
def init_lora():
# Send configuration command (example: set address to 0x0000, channel to 0x17)
cmd = bytes([0xC0, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
uart.write(cmd)
time.sleep(0.1)
# Read response
if uart.any():
resp = uart.read()
print('Response:', resp)
else:
print('No response')
print('Initializing LoRa E220...')
init_lora()
print('LoRa E220 initialized')
# Blink ATOM LED to show activity
led = Pin(27, Pin.OUT)
while True:
led.on()
time.sleep(0.5)
led.off()
time.sleep(0.5)
この作り方はAIが構成から生成したものです(未検証)。通電前に配線とコードをご確認ください。
この構成はAIが実在するM5Stack部品から設計し、ポート互換をサーバで検証したものです。編集・共有できます。
エディタで開く →UnitKit は M5Stack® 製品向けの非公式ツール。作りたいものを書くと、部品リストと配線図が出ます。