Closed mark9599 closed 5 years ago
Code:-
int counter = 0; int ss=10; int dio0=2; int rest=9;
void setup() { // LoRa.setSPIFrequency(1E6); //8e6, 4e6, and 1e6 Serial.begin(9600); while (!Serial); LoRa.setPins(ss, rest, dio0); 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++;
delay(5000); }
Connections are:- MISO -> D12 MOSI -> D11 SCLK -> D13 NSS -> D10 DIO0 -> D2 DIO1 -> D3 VCC -> 3.3V
the wiring between arduino and LoRa is not connected properly. please check the wiring.
Code:-
include
include
int counter = 0; int ss=10; int dio0=2; int rest=9;
void setup() { // LoRa.setSPIFrequency(1E6); //8e6, 4e6, and 1e6 Serial.begin(9600); while (!Serial); LoRa.setPins(ss, rest, dio0); 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++;
delay(5000); }
Connections are:- MISO -> D12 MOSI -> D11 SCLK -> D13 NSS -> D10 DIO0 -> D2 DIO1 -> D3 VCC -> 3.3V