Open nwgat opened 6 months ago
had to change to tcxoVoltage=0 because the example code one just fails to run
Send
import time sx = SX1262(spi_bus=1, clk=14, mosi=15, miso=24, cs=13, irq=16, rst=23, gpio=18) # LoRa sx.begin(freq=433, sf=12, cr=8, syncWord=0x12, power=1, currentLimit=60.0, preambleLength=8, implicit=False, implicitLen=0xFF, crcOn=True, txIq=False, rxIq=False, tcxoVoltage=0, useRegulatorLDO=False, blocking=True) while True: sx.send('Hello World!') time.sleep(10)
Receive
import time sx = SX1262(spi_bus=1, clk=14, mosi=15, miso=24, cs=13, irq=16, rst=23, gpio=18) # LoRa sx.begin(freq=433, sf=12, cr=8, syncWord=0x12, power=1, currentLimit=60.0, preambleLength=8, implicit=False, implicitLen=0xFF, crcOn=True, txIq=False, rxIq=False, tcxoVoltage=0, useRegulatorLDO=False, blocking=True) while True: msg, err = sx.recv() if len(msg) > 0: error = SX1262.STATUS[err] print(msg) print(error)
the board pinout
Hi,
You need to manually switch pin 17 to TX or RX mode before you TX or RX as this is not implemented in the library.
had to change to tcxoVoltage=0 because the example code one just fails to run
Send
Receive
the board pinout