Update RadioLib

This commit is contained in:
lewisxhe
2024-09-19 11:12:36 +08:00
parent 210367a171
commit 5794daa8aa
301 changed files with 115546 additions and 12703 deletions
@@ -28,7 +28,7 @@ SX1278 radio = new Module(10, 2, 9, 3);
// or using RadioShield
// https://github.com/jgromes/RadioShield
//SX1278 fsk = RadioShield.ModuleA;
//SX1278 radio = RadioShield.ModuleA;
void setup() {
Serial.begin(9600);
@@ -41,7 +41,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while (true);
while (true) { delay(10); }
}
// if needed, you can switch between LoRa and FSK modes
@@ -64,7 +64,7 @@ void setup() {
if (state != RADIOLIB_ERR_NONE) {
Serial.print(F("Unable to set configuration, code "));
Serial.println(state);
while (true);
while (true) { delay(10); }
}
// FSK modulation can be changed to OOK
@@ -77,7 +77,7 @@ void setup() {
if (state != RADIOLIB_ERR_NONE) {
Serial.print(F("Unable to change modulation, code "));
Serial.println(state);
while (true);
while (true) { delay(10); }
}
#warning "This sketch is just an API guide! Read the note at line 6."
@@ -177,7 +177,7 @@ void loop() {
// transmit FM tone at 1000 Hz for 1 second, then 500 Hz for 1 second
// (DIO2 is connected to Arduino pin 4)
// Note: tone() function is not available on ESP32, Arduino Due and CubeCell
// Note: tone() function is not available on Arduino Due and CubeCell
// on these platforms, the following will do nothing
#if !defined(RADIOLIB_TONE_UNSUPPORTED)
tone(4, 1000);