GPIO

Access GPIO via Sysfs.

class mauzr.platform.raspberry.gpio.Pins(core)

Bases: object

Use GPIO pins.

Parameters:core (mauzr.Core) – Core instance.
EDGE_MAPPING = {'none': 'none', 'rising': 'rising', 'falling': 'falling', 'both': 'both'}
PULL_MAPPING = {'none': 'in', 'up': 'up', 'down': 'down'}
setup_input(name, edge, pull)

Set pin as input.

Parameters:
  • name (str) – ID of the pin.
  • edge (str) – Edges to inform listeners about. May be “none”, “rising”, “falling” or “both”.
  • pull (str) – Pull mode of the pin. May be “none”, “up” or “down”.
setup_output(name)

Set pin as output.

Parameters:name (int) – Numer of the pin.