Simple test

Ensure your device works with this simple test.

examples/m5stack_pbhub_simpletest.py
 1# SPDX-FileCopyrightText: Copyright (c) 2024 Dario Cammi
 2#
 3# SPDX-License-Identifier: Unlicense
 4"""
 5Configure channel 1 io pin 1 as a digital input and read the value
 6"""
 7
 8import board
 9
10import m5stack_pbhub
11
12hub = m5stack_pbhub.PbHub(board.I2C())
13din = m5stack_pbhub.PbHubDigitalInput(hub, channel=1, io=1)
14print(f"Digitial input value: {din.value}")