We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c368f8d commit ccd485dCopy full SHA for ccd485d
examples/tca8418_simpletest.py
@@ -0,0 +1,22 @@
1
+# SPDX-FileCopyrightText: Copyright (c) 2022 ladyada for Adafruit Industries
2
+#
3
+# SPDX-License-Identifier: Unlicense
4
+
5
+import time
6
+import board
7
+from adafruit_tca8418 import TCA8418
8
9
+i2c = board.I2C() # uses board.SCL and board.SDA
10
+tca = TCA8418(i2c)
11
12
+# setup R0 as an output GPIO
13
+OUTPIN = TCA8418.R0
14
+tca.gpio_mode[OUTPIN] = True
15
+tca.gpio_direction[OUTPIN] = True
16
17
+# blink it!
18
+while True:
19
+ tca.output_value[OUTPIN] = True
20
+ time.sleep(0.1)
21
+ tca.output_value[OUTPIN] = False
22
0 commit comments