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’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=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

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

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!")
property buttons

Buttons dictionary.

This example initializes the mask and prints when the S9 button is pressed down.

import adafruit_monsterm4sk
mask = adafruit_monsterm4sk.MonsterM4sk(i2c=board.I2C())

while True:
    if mask.buttons["S9"]:
        print("Button S9 pressed!")
property light

Light sensor data.

This example initializes the mask and prints the light sensor data.

import adafruit_monsterm4sk
mask = adafruit_monsterm4sk.MonsterM4sk(i2c=board.I2C())
print(mask.light)