sandeepmistry / arduino-LoRa

An Arduino library for sending and receiving data using LoRa radios.
MIT License
1.67k stars 634 forks source link

Arduino UNO LoRa SX1278 stuck at Sending Packet : 0 #258

Closed mark9599 closed 5 years ago

mark9599 commented 5 years ago

image

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

tholud97 commented 5 years ago

the wiring between arduino and LoRa is not connected properly. please check the wiring.