The Adafruit Seesaw library makes it easy to use your ATtiny817 breakout with Arduino. Install the necessary libraries, and load the examples to use your ATtiny817 breakout for all sorts of purposes. This example is designed to verify that your breakout is working - it simply blinks the built-in LED. No hardware other than the breakout and microcontroller is needed.

Wiring

You can use many different Arduino boards, but this example shows the QT Py M0, and the Adafruit Metro. Connect up the ATtiny817 breakout as shown below.

Here is the QT Py wired up:

  • Use a STEMMA QT cable to connect the STEMMA QT connector on the QT Py to the STEMMA QT connector on the breakout.

Here is the Metro wired up:

  • Plug a STEMMA QT to male jumper wire cable into the STEMMA QT connector on the breakout.
  • Metro 5V to breakout VIN (red wire)
  • Metro GND to breakout GND (black wire)
  • Metro SCL to breakout SCL (yellow wire)
  • Metro SDA to breakout SDA (blue wire)

Library Installation

You can install the Adafruit Seesaw Library for Arduino using the Library Manager in the Arduino IDE:

Click the Manage Libraries ... menu item, search for seesaw, and select the Adafruit Seesaw library:

If asked to install dependencies, choose Install all.

Load Example

Open up File -> Examples -> Adafruit Seesaw -> digital -> attiny_blink and upload to your Arduino wired up to the breakout.

Upload the sketch to your board and open up the Serial Monitor (Tools->Serial Monitor). You should see seesaw started ok!. If you don't, check your wiring.

/*
 * This example shows how to blink a pin on a seesaw.
 * It is written to use the built-in LED on the ATtiny817 breakout with seesaw.
 */

#include "Adafruit_seesaw.h"

Adafruit_seesaw ss;

#define BLINK_PIN 5

void setup() {
  Serial.begin(115200);
  
  while (!Serial) delay(10);   // wait until serial port is opened
  
  if(!ss.begin()){
    Serial.println("seesaw not found!");
    while(1) delay(10);
  }
  
  Serial.println(F("seesaw started OK!"));

  ss.pinMode(BLINK_PIN, OUTPUT);
}

void loop() {
  ss.digitalWrite(BLINK_PIN, LOW);   // turn the LED on (the LED is tied low)
  delay(1000);                       // wait for a second
  ss.digitalWrite(BLINK_PIN, HIGH);    // turn the LED off
  delay(1000);  
}

Once you've successfully loaded the sketch onto your board, the little red LED will begin blinking!

This guide was first published on Oct 20, 2021. It was last updated on 2021-10-20 12:04:17 -0400.

This page (Arduino) was last updated on Nov 24, 2021.

Text editor powered by tinymce.