adafruit_monsterm4sk
Helper library for the Monster M4sk device. Allows usage of screens and other built-in hardware.
Author(s): Foamyguy
Implementation Notes
Hardware:
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
# * Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice # * Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- class adafruit_monsterm4sk.MonsterM4sk(i2c: busio.I2C | None = None)
Represents a single Monster M4sk
The terms “left” and “right” are always used from the perspective of looking out of the mask. The right screen is the one USB port directly above it.
- Parameters:
i2c – The I2C bus to use, will try board.I2C() if not supplied
- property acceleration: float | None
Accelerometer data, +/- 2G sensitivity.
This example initializes the mask and prints the accelerometer data.
import adafruit_monsterm4sk mask = adafruit_monsterm4sk.MonsterM4sk(i2c=board.I2C()) print(mask.acceleration)
- property boop: bool
Nose touch sense.
This example initializes the mask and prints when the nose touch pad is being touched.
import adafruit_monsterm4sk mask = adafruit_monsterm4sk.MonsterM4sk(i2c=board.I2C()) while True: if mask.boop: print("Nose touched!")