White screen when using LoRa module



  • Hello everyone, when I try to use the LoRa module i'm just getting a completely white screen.
    The code i'm using is:

    #include <M5Stack.h>
    #include <M5LoRa.h>

    void setup() {

    M5.begin();

    // override the default CS, reset, and IRQ pins (optional)
    LoRa.setPins(); // default set CS, reset, IRQ pin
    Serial.println("LoRa Receiver");
    M5.Lcd.println("LoRa Receiver");

    // frequency in Hz (433E6, 866E6, 915E6)
    if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    M5.Lcd.println("Starting LoRa failed!");
    while (1);
    }

    // LoRa.setSyncWord(0x69);
    Serial.println("LoRa init succeeded.");
    M5.Lcd.println("LoRa init succeeded.");
    }

    void loop() {
    // try to parse packet
    int packetSize = LoRa.parsePacket();
    if (packetSize) {
    // received a packet
    Serial.print("Received packet: "");
    M5.Lcd.print("Received packet: "");

    // read packet
    while (LoRa.available()) {
      char ch = (char)LoRa.read();
      Serial.print(ch);
      M5.Lcd.print(ch);
    }
    
    // print RSSI of packet
    Serial.print("\" with RSSI ");
    Serial.println(LoRa.packetRssi());
    M5.Lcd.print("\" with RSSI ");
    M5.Lcd.println(LoRa.packetRssi());
    

    }
    }

    not sure how to add a code tag sorry.
    I have tried swapping the LoRa RST and INT pins according to someone on the forum to make the LoRa work, the LoRa seems to be working okay but the screen is just completely white.



  • Hi!

    Same Situation here. If LoRa module connected, white screen. Faulty module?

    Lehel



  • Ahhh I got it!

    https://www.aliexpress.com/item/M5Stack-Official-Stock-Offer-LoRa-Module-for-ESP32-DIY-Development-Kit-Wireless-433MHz-Built-in-Antenna/32848258447.html

    Pay Attention:
    To aviod the problem that the screen can not display, GPIO5, as the NSS pin of the LoRa module, needs to be pulled up when the system is initialized.

    pinMode(5,OUTPUT);
    digitalWrite(5,HIGH);
    m5.begin():

    Now it's working. ;)

    L.



  • Strange that this never affected me. But I've added a note to the LoRa section of my big post about all these boards.


登录后回复
 

与 M5Stack Community 的连接断开,我们正在尝试重连,请耐心等待