CircuitPython Wiring & Test

You can easily wire this breakout to a microcontroller running CircuitPython. We will be using a Metro M0 Express.

I2C Wiring

  • Connect Vin to the power supply, 3-5V is fine.
  • Connect GND to common power/data ground
  • Connect the SCL pin (23) to the I2C clock SCL pin on your CircuitPython board, usually marked SCL. On a Gemma M0 this would be Pad #2/ A1
  • Connect the SDA pin (22) to the I2C data SDA pin on your CircuitPython board, usually marked SDA. On an Gemma M0 this would be Pad #0/A2
  • Connect the positive (long lead) of an LED to pin 15 on the samd09 breakout and the other lead to GND through a 1k ohm resistor.

The seesaw uses I2C address 0x49 by default. You can change this by grounding the AD0/16 and/or AD1/15 pins, but we recommend not doing that until you have it working

Download Adafruit_CircuitPython_Seesaw library

To begin using the seesaw, you will need to download Adafruit_CircuitPython_Seesaw from our github repository. You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip

Extract the zipped folder and rename the folder it contains to Adafruit_seesaw. drag the Adafruit_seesaw folder to the lib folder that appears on the CIRCUITPY drive. You'll also need the adafruit_busdevice driver.

Our CircuitPython library may change APIs so consider this beta!

Open the file on the CIRCUITPY drive and copy and paste the following code:

from board import *
import busio
from adafruit_seesaw.seesaw import Seesaw
import time

myI2C = busio.I2C(SCL, SDA)

ss = Seesaw(myI2C)

ss.pin_mode(15, ss.OUTPUT);

while True:
	ss.digital_write(15, True)   # turn the LED on (True is the voltage level)
	time.sleep(1)                # wait for a second
	ss.digital_write(15, False)  # turn the LED off by making the voltage LOW

The LED attached to pin 15 should blink on and off repeatedly.

This guide was first published on Nov 01, 2017. It was last updated on Feb 27, 2024.

This page (CircuitPython Wiring & Test) was last updated on Nov 01, 2017.

Text editor powered by tinymce.