From 2c3f22335fc965a2c60fa5842c1a4979c8eb195e Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 27 Oct 2021 23:22:14 +0200 Subject: [PATCH] Use Module::tone override in FSK example --- examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino b/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino index 3239472d..947e7ce3 100644 --- a/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino +++ b/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino @@ -175,16 +175,15 @@ void loop() { Serial.println(state); } - // tone() function is not available on ESP32, Arduino Due and CubeCell - #if !defined(ESP32) && !defined(_VARIANT_ARDUINO_DUE_X_) && !defined(__ASR6501__) // transmit FM tone at 1000 Hz for 1 second // (DIO2 is connected to Arduino pin 4) - tone(4, 1000); + // Note: tone() function is not available on ESP32, Arduino Due and CubeCell + // on these platforms, the following will do nothing + Module::tone(4, 1000); delay(1000); // transmit FM note at 500 Hz for 1 second - tone(4, 500); + Module::tone(4, 500); delay(1000); - #endif // NOTE: after calling transmitDirect(), SX127x will start // transmitting immediately! This signal can jam other