IoT Drivers  v3.3.0 (S2022)
Engineering in Software Technology
Quick start guide for SEN14262 Sound Sensor Driver

This is the quick start guide for the Driver for SEN-14262 sound sensor, with step-by-step instructions on how to configure and use the driver in simple use cases.

The use cases contain several code fragments. The code fragments in the steps for setup can be copied into a custom initialization function, while the steps for usage can be copied into, e.g., the main application function.

SEN14262 Driver use cases

Initialise the driver

  1. The following must be added to the project:
    #include <sen14262.h>
  2. Add to application initialization: Initialise the driver:

As soon as the driver is initialised it will automatically start measuring the envelope sound signal from the sensor.

Perform a Sound measuring

In this use case, the latest envelope sound measuring will be retrieved from the driver.

Note
The driver must be initialised Initialise the driver before a measuring can be performed.
  1. Define a variable to store the sound value into.
    uint16_t lastSoundValue;
  2. Get the latest measuring from the driver.
    lastSoundValue = sen14262_envelope();
sen14262.h
Driver to a SEN-14262 sound sensor.
sen14262_envelope
uint16_t sen14262_envelope(void)
Gives the latest measured envelope value from the sensor.
sen14262_initialise
void sen14262_initialise(void)
Initialise the sound sensor driver.