You've already forked TEF6686_ESP32
Added tone function
Added tone function. Syntax: radio.tone(x, y, z); x = length in mS y = Amplitude in dB, -30 to 0 z = Frequency in Hertz. (10 to 20000) Note. After this command the audio is set to Unmute.
This commit is contained in:
@@ -423,3 +423,10 @@ uint16_t TEF6686::tune_AM(uint8_t up, uint8_t stepsize) {
|
||||
Radio_SetFreq_AM(Radio_GetCurrentFreq_AM());
|
||||
return Radio_GetCurrentFreq_AM();
|
||||
}
|
||||
|
||||
void TEF6686::tone(uint16_t time, int16_t amplitude, uint16_t frequency) {
|
||||
devTEF_Audio_Set_Mute(0);
|
||||
devTEF_Radio_Set_Wavegen(1, amplitude, frequency);
|
||||
delay (time);
|
||||
devTEF_Radio_Set_Wavegen(0, 0, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user