/ seesaw / code.py
code.py
 1  # SPDX-FileCopyrightText: 2018 Dan Halbert for Adafruit Industries
 2  #
 3  # SPDX-License-Identifier: MIT
 4  
 5  import time
 6  
 7  import board
 8  import busio
 9  from adafruit_seesaw.seesaw import Seesaw
10  
11  myI2C = busio.I2C(board.SCL, board.SDA)
12  
13  ss = Seesaw(myI2C)
14  
15  ss.pin_mode(15, ss.OUTPUT)
16  
17  while True:
18      ss.digital_write(15, True)   # turn the LED on (True is the voltage level)
19      time.sleep(1)                # wait for a second
20      ss.digital_write(15, False)  # turn the LED off by making the voltage LOW
21      time.sleep(1)