sparkfun / MicroMod_Machine_Learning_Carrier

Other
5 stars 2 forks source link

Example1_MicrophoneOutput compile error #1

Closed johncaipa closed 3 years ago

johncaipa commented 3 years ago

Hi I am trying to test this example of the microphone, but I have the following error:

Arduino:1.8.13 (Windows 10), Tarjeta:"SparkFun MicroMod nRF52840 Processor Board" Example1_MicrophoneOutput:24:1: error: 'AP3_PDM' does not name a type; did you mean 'NRF_PDM'? AP3_PDM myPDM; //Create instance of PDM class ^~~ NRF_PDM D:MicroMod_Machine_Learning_Carrier-master\Examples\Example1_MicrophoneOutput\Example1_MicrophoneOutput.ino: In function 'void setup()': Example1_MicrophoneOutput:35:7: error: 'myPDM' was not declared in this scope if (myPDM.begin(36, 37) == false) // Turn on PDM with default settings, start interrupts ^~~~~ D:MicroMod_Machine_Learning_Carrier-master\Examples\Example1_MicrophoneOutput\Example1_MicrophoneOutput.ino:35:7: note: suggested alternative: 'PDM' if (myPDM.begin(36, 37) == false) // Turn on PDM with default settings, start interrupts ^~~~~ PDM D:MicroMod_Machine_Learning_Carrier-master\Examples\Example1_MicrophoneOutput\Example1_MicrophoneOutput.ino: In function 'void loop()': Example1_MicrophoneOutput:48:7: error: 'myPDM' was not declared in this scope if (myPDM.available()) ^~~~~ D:MicroMod_Machine_Learning_Carrier-master\Examples\Example1_MicrophoneOutput\Example1_MicrophoneOutput.ino:48:7: note: suggested alternative: 'PDM' if (myPDM.available()) ^~~~~ PDM Example1_MicrophoneOutput:56:24: error: 'AM_HAL_SYSCTRL_SLEEP_DEEP' was not declared in this scope am_hal_sysctrl_sleep(AM_HAL_SYSCTRL_SLEEP_DEEP); ^~~~~~~~~ Example1_MicrophoneOutput:56:3: error: 'am_hal_sysctrl_sleep' was not declared in this scope am_hal_sysctrl_sleep(AM_HAL_SYSCTRL_SLEEP_DEEP); ^~~~~~~~ D:MicroMod_Machine_Learning_Carrier-master\Examples\Example1_MicrophoneOutput\Example1_MicrophoneOutput.ino: In function 'void printPDMConfig()': Example1_MicrophoneOutput:139:11: error: 'myPDM' was not declared in this scope switch (myPDM.getClockDivider()) ^~~~~ ....

exit status 1 'AP3_PDM' does not name a type; did you mean 'NRF_PDM'?

johncaipa commented 3 years ago

Could you help me, I don't know what the problem is, I want to be able to use the microphone for my tinyml models

santaimpersonator commented 3 years ago

It looks like you have the nRF processor board selected.

The example explicitly states that it is intended for the Artemis processor board:

This example demonstrates how to use the pulse density microphone (PDM) on Artemis boards. This library and example are heavily based on the Apollo3 pdm_fft example.

johncaipa commented 3 years ago

ok I understand, my mistake, but could there be some examples of how to use the sensors of these boards: MicroMod nRF52840 Processor Board + MicroMod Machine Learning Board, especially to use the microphone.

santaimpersonator commented 3 years ago

Unfortunately, the nRF processor board was released after the ML carrier board. Therefore, I don't know if any of the examples associated with this carrier board will work for that MicroMod combination.

However, there was an edge impulse workshop from yesterday that might be helpful to you: https://www.youtube.com/watch?v=qdzPTzL7ChI

Since this is not an actual issue with the board, I am going to close this issue. Feel free to use our forum for further technical assistance.