Migrated to arduino

This commit is contained in:
2025-12-25 15:37:12 +01:00
parent 692320a635
commit ce6a2b9185
6 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
from machine import Pin, SPI
from sx127x import SX127x
# SPI bus
spi = SPI(1, baudrate=1000000, polarity=0, phase=0,
sck=Pin(18), mosi=Pin(23), miso=Pin(19))
# LoRa module
lora = SX127x(spi, cs=Pin(14), reset=Pin(26), irq=Pin(33),
freq=868E6, # or 915E6 depending on region
sf=7, # spreading factor
bw=125E3, # bandwidth
cr=5) # coding rate