OzWrapper.OzNoise.OzNoise¶
Noise level sensor wrapper (v1).
This module provides OzNoise, the first-generation noise-level
sensor wrapper for Oizom environmental monitors. It communicates with a
SAMD-based co-processor over UART (via the drivers.OzLan.OzLan.OzLan
driver) to read ambient sound pressure level measurements - equivalent
continuous level (Leq), maximum (Lmax), and minimum (Lmin) - reported in
dBA SPL through the SensorBase.SensorBase.GenericSensor contract.
Reference config:
{
"noise": [
{
"en": 1,
"pn": 41,
"gpio": {
"baud": 115200,
"port": "/dev/ttyACM0"
},
"parameters": [
{
"cr": 0,
"pm": 1,
"sc": "leq",
"se": 100
},
{
"cr": 0,
"pm": 2,
"sc": "lmax",
"se": 100
},
{
"cr": 0,
"pm": 3,
"sc": "lmin",
"se": 100
}
]
}
]
}
Example
Instantiate the wrapper and initialise the sensors declared in the Gateway configuration:
>>> from OzWrapper.OzNoise.OzNoise import OzNoise
>>> noise = OzNoise()
>>> init_state: dict = {}
>>> noise.initialize(config["noise"], init_state)
True
Note
This is the legacy v1 implementation built around a single SAMD
microphone front-end. For newer deployments that expose octave-band
metrics and improved diagnostics, prefer
OzWrapper.OzNoiseV2.OzNoiseV2.OzNoiseV2.
Attributes¶
Classes¶
Wrapper for noise-level sensors via a SAMD co-processor. |
Module Contents¶
- OzWrapper.OzNoise.OzNoise.basic_logger¶
- OzWrapper.OzNoise.OzNoise.context_logger¶
- OzWrapper.OzNoise.OzNoise.dirname¶