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!
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login