Skip to content

receiving with interrupt callback not working #16

Open
@dukeduck1984

Description

Hi,

I have set the dio_0 pin number in config.py and changed the code in examples/LoRaReceiver.py as following:

def receive(lora):
    print('LoRa Receiver Callback')
    
    def cb(payload):
        lora.blink_led()
        print(payload)
    
    lora.on_receive(cb)
    lora.receive()

But it didn't work - couldn't receive any data. It only worked with while True loop as shown in the original example.

Did I miss something? Pls help!

It's an AI-Thinker Ra-02 LoRa module with ESP32. The MicroPython firmware is V1.13 stable.

I used the sx127x driver in the master branch, and the readme title is uPyLora.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions