LoRa Portable Node
This is a small circuit board with single line sockets for a Lora FeatherWing and a Raspberry Pi Pico.
Pinouts
| LoRa FeatherWing | Pin | Pin | Raspberry Pi Pico | Comment |
|---|---|---|---|---|
| NC first 3 | 14-16 | n/a | n/a | |
| SPI PICO | 12 | 25 | SPI0 TX | |
| SPI POCI | 13 | 21 | SPI0 Rx | |
| SPI SCLK | 11 | 24 | SPI0 SCLK | |
| unused | 10 | |||
| unused | 9 | |||
| unused | 8 | |||
| unused | 7 | |||
| unused | 6 | 22 | SPI0 CS | connect RFM 6 to central CS |
| unused | 5 | |||
| GND | 4 | 23,28 | GND | 23 used to RFM, 28 for tri-colour LED |
| unused | 3 | |||
| 3.3V | 2 | 36 | 3.3V OUT | using jumper wire |
| NC (?reset) | 1 | |||
| n/a | 26 | GP20 - LED blue | ||
| n/a | 27 | GP21 - LED green | ||
| n/a | 28 | GND to LED | ||
| n/a | 29 | GP23 - LED red |
Shuffling Pico down, I can preserve the idea that GND is passed straight through.
Code to run from Micropython shell:
from machine import SPI, Pin, PWM
from micropython_rfm9x import *
spi = SPI(0, baudrate=10_000, sck=Pin(18), mosi=Pin(19), miso=Pin(16))
cs = Pin(17, mode=Pin.OUT, value=1)
reset = Pin(26, mode=Pin.OUT, value=1) # GP26 not used
red = PWM(Pin(22), 1000)
green = PWM(Pin(21), 1000)
blue = PWM(Pin(20), 1000)
red.duty_u16(200)
green.duty_u16(200)
blue.duty_u16(200)
freq = 433.2
with_header= True
rfm = RFM9x(spi, cs, reset, freq, high_power=True)
rfm.tx_power = 6
time.sleep(3)
print(rfm.frequency_mhz)
red.duty_u16(1000)