BiVo EFM32GG12  0.1
An open source foundation foundation for remote monitoring of bird vocalizations.
standard_mode.c File Reference

Standard mode is essentially a stand-by mode for recording segments to show case BiVo's functionality. More...

#include "standard_mode.h"

Functions

void initMode (void)
 Initialize the modules needed for the operation of the standard mode. Needed modules: serial communication microphone audio analysis.
 
void deinitMode (void)
 De-initialize the modules used for the operation of the standard mode.
 
void run_standard_mode (void)
 Run the standard operational mode. First begins with handshake from desktop application. Then falls into the operation of waiting for the command from the app to record a segment, records a segment and analyzes it, and forwards it if it passes analysis. Otherwise, keeps recording segments and analyzing until analysis passes and the segment is forwarded. Then waits for command from app again and repeats indefinitely. More...
 

Variables

struct MicConfig mic_config
 
struct AnlysConfig anlys_config
 

Detailed Description

Standard mode is essentially a stand-by mode for recording segments to show case BiVo's functionality.

Authors
Kevin Imlay
Date
4-20-21

Function Documentation

◆ run_standard_mode()

void run_standard_mode ( void  )

Run the standard operational mode. First begins with handshake from desktop application. Then falls into the operation of waiting for the command from the app to record a segment, records a segment and analyzes it, and forwards it if it passes analysis. Otherwise, keeps recording segments and analyzing until analysis passes and the segment is forwarded. Then waits for command from app again and repeats indefinitely.

Note
in this version, handshake happens for every segment as a quick fix for matlab code not keeping track of if board is connected bewteen calls for segment.

Variable Documentation

◆ anlys_config

struct AnlysConfig anlys_config
Initial value:
= {
.fftSize = 256,
.freqLower = 0,
.freqUpper = 9950,
.powerThreshold = 20,
.sampleScaler = 50
}

Settings for the audio analysis

◆ mic_config

struct MicConfig mic_config
Initial value:
= {
.clk_prescalar = 29,
.down_sample_rate = 32,
.mic_gain = 7
}

Settings for the microphone