Use Module::tone override in FSK example

This commit is contained in:
jgromes 2021-10-27 23:22:14 +02:00
parent e03b674e10
commit 2c3f22335f

View file

@ -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