Skip to content

Commit 64e7c7f

Browse files
committed
Adding ATtiny simpletest.
1 parent 87ea110 commit 64e7c7f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

examples/seesaw_attiny_simpletest.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
"""
4+
Simple seesaw test for ATtiny8x7 breakout using built-in LED on pin 5.
5+
"""
6+
import time
7+
import board
8+
from adafruit_seesaw.seesaw import Seesaw
9+
10+
ss = Seesaw(board.I2C())
11+
12+
ss.pin_mode(5, ss.OUTPUT)
13+
14+
while True:
15+
ss.digital_write(5, False) # Turn the LED on (the built-in LED is active low!)
16+
time.sleep(1) # Wait for one second
17+
ss.digital_write(5, True) # Turn the LED off
18+
time.sleep(1) # Wait for one second

0 commit comments

Comments
 (0)