nanoFramework.Iot.Device.Seesaw 1.0.172.55149

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Seesaw --version 1.0.172.55149                
NuGet\Install-Package nanoFramework.Iot.Device.Seesaw -Version 1.0.172.55149                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Seesaw" Version="1.0.172.55149" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.Seesaw --version 1.0.172.55149                
#r "nuget: nanoFramework.Iot.Device.Seesaw, 1.0.172.55149"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install nanoFramework.Iot.Device.Seesaw as a Cake Addin
#addin nuget:?package=nanoFramework.Iot.Device.Seesaw&version=1.0.172.55149

// Install nanoFramework.Iot.Device.Seesaw as a Cake Tool
#tool nuget:?package=nanoFramework.Iot.Device.Seesaw&version=1.0.172.55149                

Adafruit Seesaw - extension board (ADC, PWM, GPIO expander)

Adafruit Seesaw is a near-universal converter framework which allows you to add and extend hardware support to any I2C-capable microcontroller or microcomputer. Instead of getting separate I2C GPIO expanders, ADCs, PWM drivers, etc, seesaw can be configured to give a wide range of capabilities.

This binding provides an API which is close to the one provided by Adafruit themselves but also implements IGpioController so that available Gpio pins can be used in place of any 'on board' ones but using the standard IoT API.

This binding was developed using the Adafruit Seesaw breakout board which uses the ATSAMD09 and the default firmware exposes the following capabilities:

  • 3 x 12-bit ADC inputs
  • 3 x 8-bit PWM outputs
  • 7 x GPIO with selectable pullup or pulldown
  • 1 x NeoPixel output (up to 340 pixels)
  • 1 x EEPROM with 64 byte of NVM memory (handy for storing small access tokens or MAC addresses)
  • 1 x Interrupt output that can be triggered by any of the accessories

Documentation

Usage

Hardware Required

  • SEESAW
  • Male/Female Jumper Wires

Circuit

  • SCL - SCL
  • SDA - SDA
  • VCC - 5V
  • GND - GND

Code

Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);

For other devices like STM32, please make sure you're using the preset pins for the I2C bus you want to use.

Connecting to a Seesaw breakout board via I2C

This sample simply connects to an Adafruit Seesaw breakout board, reads and then displays the capabilities of the board firmware.

const byte Adafruit_Seesaw_Breakout_I2cAddress = 0x49;
const byte Adafruit_Seesaw_Breakout_I2cBus = 0x1;

using (I2cDevice i2cDevice = I2cDevice.Create(new I2cConnectionSettings(Adafruit_Seesaw_Breakout_I2cBus, Adafruit_Seesaw_Breakout_I2cAddress)))
using (Seesaw ssDevice = new Seesaw(i2cDevice))
{
    Console.WriteLine();
    Console.WriteLine($"Seesaw Version: {ssDevice.Version}");
    Console.WriteLine();

    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Status));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Gpio));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Sercom0));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Timer));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Adc));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Dac));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Interrupt));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Dap));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Eeprom));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Neopixel));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Touch));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Keypad));
    Console.WriteLine(GetModuleAvailability(ssDevice, Seesaw.SeesawModule.Encoder));

    Console.WriteLine("");
}

Where the aforementioned GetModuleAvailability is defined as follows:

static string GetModuleAvailability(Seesaw ssDevice, Seesaw.SeesawModule module)
{
    var moduleAvailable = ssDevice.HasModule(module) ? "available" : "not-available";
    return $"Module: {module.ToString()} - {moduleAvailable}";
}
Connecting to a Seesaw based soil mositure sensor

This sample connects an ESP32 to a Adafruit capacitive soil sensor

    const byte Adafruit_Seesaw_SoilSensor_I2cAddress = 0x49;
    const byte Adafruit_Seesaw_SoilSensor_I2cBus = 0x1;

    using (I2cDevice i2cDevice = I2cDevice.Create(new I2cConnectionSettings(Adafruit_Seesaw_SoilSensor_I2cBus, Adafruit_Seesaw_SoilSensor_I2cAddress)))
    using(Seesaw ssDevice = new Seesaw(i2cDevice))
    {
        while(true)
        {
            Console.WriteLine($"Temperature: {ssDevice.GetTemperature()}'C");
            Console.WriteLine($"Capacitive: {ssDevice.TouchRead(0)}");
            ssDevice.SetGpioPinMode(1, PinMode.Output);
            Thread.Sleep(1000);
        }
    }

Binding Notes

In general the Seesaw technology allows user the embedding of the following types of modules into firmware and the modules ticked are the ones that have been covered by this binding.

  • Status - providing overall feedback on the availability of modules and control of the expander
  • Gpio
  • Serial Communications
  • Timers
  • Analog Input
  • Analog Output
  • DAP
  • EEPROM (although untested)
  • Capacitive Touch
  • Keypad
  • Rotary Encoder
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 71 2/11/2025
1.0.192.2023 84 2/4/2025
1.0.189.52576 77 2/4/2025
1.0.172.55149 80 1/31/2025
1.0.160.555 68 1/20/2025
1.0.154.57867 60 1/13/2025
1.0.135.65220 88 12/30/2024
1.0.121.35597 83 12/18/2024
1.0.113.30333 90 12/16/2024
1.0.90.5290 101 10/23/2024
1.0.79.32597 98 10/11/2024
1.0.73.3169 97 10/3/2024
1.0.68.6193 102 9/27/2024
1.0.56.61818 124 9/6/2024
1.0.48.29543 106 8/28/2024
1.0.30.14943 122 8/9/2024
1.0.18.1637 91 7/26/2024
1.0.1.18803 128 7/4/2024