Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can't seem to get it to work with Waveshare RP2040-Lora LF board #26

Open
nwgat opened this issue May 30, 2024 · 1 comment
Open

Can't seem to get it to work with Waveshare RP2040-Lora LF board #26

nwgat opened this issue May 30, 2024 · 1 comment

Comments

@nwgat
Copy link

nwgat commented May 30, 2024

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)

image

the board pinout
RP2040-LoRa-HF-details-11
rp2040-lora-lf-1_1
rp2040-lora-lf-kit-5

@ehong-tl
Copy link
Owner

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.

image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants