Hi all.
I'm trying to get started making some custom firmware for the AudioMoth to detect bat, dolphin and porpoise clicks and record a long term spectral average.
I've bought the Wonder Gecko starter kit, downloaded Simplicity Studio and set the basic firmware project up according to instructions on GitHub. The projects builds just fine however I cannot seem to get printf statements to display on the console? I've added AudioMoth_setupSWOForPrint() after AudioMoth_initialise() to enable output however that does not appear to make a difference.
I'm pretty new to this type of device. Am I missing something obvious here? Should I be using a special terminal in Simplicity Studio or something?
Also does anyone have advice on how to better replicate an AudioMoth using the development board. Do developers usually solder an SD card reader and/or microphone to the development board?
Any help much appreciated.
/* Main function */
int main(void) {
/* Initialise device */
AudioMoth_initialise();
AudioMoth_setupSWOForPrint();
// push dummy newline through SWO so first interrupt outputs message
printf("Starting up BP_Firmware module.\n");
/* Check the switch position */
AM_switchPosition_t switchPosition = AudioMoth_getSwitchPosition();
if (switchPosition == AM_SWITCH_USB) {
/* Handle the case that the switch is in USB position. Waits in low energy state until USB disconnected or switch moved */
AudioMoth_handleUSB();
} else {
/* Flash both LED */
// AudioMoth_setBothLED(true);
AudioMoth_delay(100);
// AudioMoth_setBothLED(false);
AudioMoth_setRedLED(true);
printf("hello\n");
}
/* Power down and wake up in one second */
AudioMoth_powerDownAndWake(1, true);
}
Thanks very much for the hint! I'll give that a go.