if (!LoRa.begin(915E6)) { // initialize ratio at 915 MHz
Serial.println("LoRa init failed. Check your connections.");
while(true); //if failed, do nothing
}
if (!LoRa.begin(915E6)) { // initialize ratio at 915 MHz
Serial.println("LoRa init failed. Check your connections.");
while(true); //if failed, do nothing
}
}
void loop() {
// try to parse packet
int packetSize = LoRa.parsePacket();
if (packetSize > 0) {
Serial.print("Received packet '"); // 수신된 데이터 크기를 packetSize에 저장
Serial.println(packetSize); //수신된 데이터가 존재 한다.