🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    White screen when using LoRa module

    FAQS
    3
    4
    9.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kieran.osborne
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • L
        lelehel
        last edited by

        Hi!

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

        Lehel

        1 Reply Last reply Reply Quote 0
        • L
          lelehel
          last edited by

          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.

          1 Reply Last reply Reply Quote 1
          • RopR
            Rop
            last edited by

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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post