RAKWireless / RAKwireless-Audio-library

RAKwireless Audio library or the audio solution Modules
MIT License
1 stars 2 forks source link

FTT example doesn't work #8

Open gabrielbravov opened 1 month ago

gabrielbravov commented 1 month ago

Hello friends,

I'm buyed an Wisblock Microphone Starter Kit (SKU 116088) working with PDMSerialPlotterFFT example from https://github.com/RAKWireless/RAKwireless-Audio-library/blob/main/examples/RAK4631/PDMSerialPlotterFFT/PDMSerialPlotterFFT.ino

I run the example in Arduino IDE and works nice only two loop cycles, then just says

12:42:41.701 -> Frequency:0, nan:nan
12:42:41.701 -> Frequency:0, nan:nan
12:42:41.701 -> Frequency:0, nan:nan
12:42:41.701 -> Frequency:0, nan:nan
12:42:41.701 -> Frequency:0, nan:nan
12:42:41.701 -> Frequency:0, nan:nan

¿how can i solve it?

gabrielbravov commented 1 month ago

Also, i tried all the examples that finish with "18003" in the follow link but none works. ¿what im doing wrong?

https://github.com/RAKWireless/RAKwireless-Audio-library/tree/main/examples/RAK4631

gabrielbravov commented 1 month ago

The only example that work it it's https://github.com/RAKWireless/RAKwireless-Audio-library/tree/main/examples/RAK4631/PDMSerialPlotter_RAK18003

gabrielbravov commented 1 month ago

I tried this example and works ok.

https://github.com/RAKWireless/RAKwireless-Audio-library/blob/main/examples/RAK4631/Audio_Alarm/Audio_Alarm.ino

The main difference it's that Audio_Alarm.ino don't initialize SPI CS1,CS2 and CS3 in RAK18003Init();. Expander2.digitalWrite(0, 1); //set SPI CS1 High Expander2.digitalWrite(1, 1); //set SPI CS2 High Expander2.digitalWrite(2, 1); //set SPI CS3 High

I tried to do the same in the FTT&PDM Examples but didn't work it.

geoffrak commented 1 month ago

The basic serial plotter and Audio_Alarm will work with most version of the Arduino IDE. The FFT example does not work with 2.x versions, so this is likely your problem.

I use the 1.8.19 version which will work. The reason is that the Serial Plotter works differently between the 2.x and 1.x versions.