OzWrapper.OzSamdV2.OzSamdV2¶
SAMD V2 microcontroller wrapper for peripheral sensor management and firmware updates.
This module provides OzSamdV2, a wrapper around the v2 SAMD MCU
co-processor used in Oizom environmental monitors. It manages communication
with the SAMD V2 board over USB-ACM serial, coordinating wind, noise, rain,
visible light, surface temperature, UVA, and pyranometer sensors. It supports
firmware flashing via bossac and continuous real-time data streaming over
MQTT.
Compared to the legacy OzWrapper.OzSamd.OzSamd.OzSamd wrapper, the
v2 protocol adopts:
A new AT-style poll command (
AT\r\n) with a firmware version banner (FW:2.1) used for liveness and firmware-mismatch detection.A higher serial baud rate (115200) with explicit read/write timeouts.
Thread-safe access to the shared serial port via a re-entrant lock, so the background streaming thread and synchronous reads cannot collide.
OTA firmware updates via
bossacwith success verification (100% + Verify successful) and automatic re-initialization on failure.
Example
>>> from OzWrapper.OzSamdV2.OzSamdV2 import OzSamdV2
>>> wrapper = OzSamdV2()
>>> wrapper.initialize(config, init_value, mqtt_queue)
Note
Requires the SAMD V2 firmware binary at
/usr/src/app/OzWrapper/OzSamdV2/firmware.bin and the bossac
upload helper at /usr/src/app/OzWrapper/OzSamdV2/bossac/upload.sh
for OTA flashing. Inherits from
SensorBase.SensorBase.GenericSensor.
Attributes¶
Classes¶
SAMD V2 microcontroller wrapper with firmware update and real-time streaming. |
Module Contents¶
- OzWrapper.OzSamdV2.OzSamdV2.basic_logger¶
- OzWrapper.OzSamdV2.OzSamdV2.config¶
- OzWrapper.OzSamdV2.OzSamdV2.context_logger¶