Open alemori opened 5 years ago
What is "the shipping sketch"? If you mean the sketch the device shipped with, maybe that's all it does? Try working with one of the examples provided.
I am using your sketch provided by you
Please provide your code and your wiring to the SX1278
The connection is :
SX1278 | Wemos D1 MINI Gnd | Gnd 3.3 | 3.3 Dio00 | GPIO5 Dio01 | GPIO4 MISO | GPIO12 MOSI | GPIO13 SS | GPIO15 RST | GPIO16 SCK | GPIO14
int counter = 0;
void setup() { Serial.begin(9600); while (!Serial);
Serial.println("LoRa Sender");
if (!LoRa.begin(433E6)) { Serial.println("Starting LoRa failed!"); while (1); } }
void loop() { Serial.print("Sending packet: "); Serial.println(counter);
// send packet LoRa.beginPacket(); LoRa.print("hello "); LoRa.print(counter); LoRa.endPacket();
counter++;
Two things stand out right away.
1) you're not using the default pins you are not calling setPins
This has me surprised you are receiving any packets at all
2) though your example cuts off so I cannot be sure, if you don't have a delay in your loop
you'll be sending the packet over and over again as fast as the processor can handle, this will prevent the radio from actually ever transmitting.
I think it's more likely the first issue, you need to call setPins
Sorry, the scketch has setpins(15,5,4) with the corresponding pins according to the connection you send, there is also the delay. I copied the sketch badly.
Make another test with arduino one, and go the code
int counter = 0;
void setup() { Serial.begin(9600); LoRa.setPins(10, 9, 2); while (!Serial);
Serial.println("LoRa Sender");
if (!LoRa.begin(433E6)) { Serial.println("Starting LoRa failed!"); while (1); } pinMode(5,OUTPUT); }
void loop() { Serial.print("Sending packet: "); Serial.println(counter); digitalWrite(5,LOW); // send packet LoRa.beginPacket(); LoRa.print("hello "); LoRa.print(counter); LoRa.endPacket(); digitalWrite(5,HIGH); int rssi = LoRa.packetRssi(); counter++;
delay(5000); }
Hello, I'm using an arduino one connected to a sx1278 of 433mhz, when I run the shipping sketch runs the first package and then does not send any more, what can be?