runExample()
except (KeyboardInterrupt, SystemExit) as exErr:
print("\nEnding Example 1")
sys.exit(0)
Qwiic GPIO Example 2
Example 2 shows how to read each I/O pin when they are configured as inputs. It first sets up all pins using the
function as we did in Example 1. The code then monitors and prints out the status of each input every
setMode
0.25 seconds. You can copy the entire example below or open it from your downloaded copy of the Python
package:
Need help?
Do you have a question about the Qwiic GPIO and is the answer not in the manual?
Questions and answers