Mic Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld
Mic Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld

Use the sound level to trigger a hardware action, sense the level of noise to trigger an alarm, how about opening your door with a secret knock!
Learn more from the examples pageThis shield is one of the basic I/O shields. 

 
Basic I/O shields allows you to tap into your smartphone’s sensors and use in prototyping with Arduino, you can get information from the surrounding environment and use it to trigger a certain action.
Learn more from the basic I/O shields tutorial.

Mic library allows Arduino board to use the mic of your smartphone so that it can measures the level of noise in decibels (db) and take an action once a threshold reached.

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_MIC_SHIELD is a key that will let you unlock the MIC shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.

“There are permissions to be granted by Android M users before they can use the Mic shield please make sure to grant the permissions or else it may affect the application’s performance.”

Get noise level measured by the mic from the smarpthone.

SYNTAX

Mic.getValue( );

RETURNS

byte value of data.

PARAMETERS

None.

USAGE

byte value = Mic.getValue();

Stops recording voice data.

SYNTAX

Mic.stopRecording( );

RETURNS

None.

PARAMETERS

None.

USAGE

Mic.stopRecording();

Starts recording voice data.

SYNTAX

Mic.startRecording( );

RETURNS

None.

PARAMETERS

None.

USAGE

Mic.startRecording();

Starts recording voice data with a file name.

SYNTAX

Mic.startRecording(FileName);

RETURNS

None.

PARAMETERS

Record file name.

USAGE

Mic.startRecording("Mic1");

Starts recording voice data with a file name.

SYNTAX

Mic.startRecording(FileName);

RETURNS

None.

PARAMETERS

Record file name.

USAGE

String fileName = "Mic1";
Mic.startRecording(fileName);

Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a new value of the mic is sensed.

SYNTAX

Mic.setOnValueChange(&userFunctionName);

RETURNS

None.

PARAMETERS

&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

USAGE

Mic.setOnButtonChange(&myFunction);
/* myFunction exists under the loop function. */
/* This function will be invoked each time a new noise value is sensed by the mic. */
void myFunction (byte noiseValue)
{
    /*Print out the light values on the Terminal of the application. */
    Terminal.println(noiseValue);
}