adafruit_seesaw.seesaw¶
An I2C to whatever helper chip.
- Author(s): Dean Miller
 
Implementation Notes¶
Hardware:
- Adafruit ATSAMD09 Breakout with seesaw (Product ID: 3657)
 
Software and Dependencies:
- Adafruit CircuitPython firmware: https://circuitpython.org/
 - or Adafruit Blinka: https://circuitpython.org/blinka
 - Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
 
- 
class 
adafruit_seesaw.seesaw.Seesaw(i2c_bus, addr=73, drdy=None)[source]¶ Driver for Seesaw i2c generic conversion trip
Parameters: - i2c_bus (I2C) – Bus the SeeSaw is connected to
 - addr (int) – I2C address of the SeeSaw device
 - drdy (DigitalInOut) – Pin connected to SeeSaw’s ‘ready’ output
 
- 
digital_read_bulk(pins, delay=0.008)[source]¶ Get the values of all the pins on the ‘A’ port as a bitmask
- 
digital_read_bulk_b(pins, delay=0.008)[source]¶ Get the values of all the pins on the ‘B’ port as a bitmask
- 
disable_encoder_interrupt(encoder=0)[source]¶ Disable the interrupt from firing when the encoder changes
adafruit_seesaw.crickit - Pin definition for Adafruit CRICKIT¶
adafruit_seesaw.analoginput¶
- 
class 
adafruit_seesaw.analoginput.AnalogInput(seesaw, pin)[source]¶ CircuitPython-compatible class for analog inputs
This class is intended to be a compatible subset of
analogio.AnalogInParameters: - 
reference_voltage¶ The reference voltage for the pin
- 
value¶ The current analog value on the pin, as an integer from 0..65535 (inclusive)
- 
 
adafruit_seesaw.digitalio¶
- 
class 
adafruit_seesaw.digitalio.DigitalIO(seesaw, pin)[source]¶ CircuitPython-compatible class for digital I/O pins
This class is intended to be a compatible subset of
digitalio.DigitalInOut.Due to technical limitations, PULL_DOWNs are not supported.
Parameters: - 
direction¶ Retrieve or set the direction of the pin
- 
drive_mode¶ Retrieve or set the drive mode of an output pin
- 
pull¶ Retrieve or set the pull mode of an input pin
- 
switch_to_output(value=False, drive_mode=<sphinx.ext.autodoc.importer._MockObject object>)[source]¶ Switch the pin to output mode
- 
value¶ Retrieve or set the value of the pin
- 
 
adafruit_seesaw.keypad¶
- 
class 
adafruit_seesaw.keypad.KeyEvent(num, edge)[source]¶ Holds information about a key event in its properties
Parameters: - num (int) – The number of the key
 - edge (int) – One of the EDGE propertes of 
adafruit_seesaw.keypad.Keypad 
- 
class 
adafruit_seesaw.keypad.Keypad(i2c_bus, addr=73, drdy=None)[source]¶ On compatible SeeSaw devices, reads from a keypad.
Parameters: - i2c_bus (I2C) – Bus the SeeSaw is connected to
 - addr (int) – I2C address of the SeeSaw device
 - drdy (DigitalInOut) – Pin connected to SeeSaw’s ‘ready’ output
 
- 
EDGE_FALLING= 2¶ Indicates that the key was recently pressed
- 
EDGE_HIGH= 0¶ Indicates that the key is currently pressed
- 
EDGE_LOW= 1¶ Indicates that the key is currently released
- 
EDGE_RISING= 3¶ Indicates that the key was recently released
- 
count¶ Retrieve or set the number of keys
- 
interrupt_enabled¶ Retrieve or set the interrupt enable flag
adafruit_seesaw.neopixel¶
- 
adafruit_seesaw.neopixel.GRB= (1, 0, 2)¶ Green Red Blue
- 
adafruit_seesaw.neopixel.GRBW= (1, 0, 2, 3)¶ Green Red Blue White
- 
class 
adafruit_seesaw.neopixel.NeoPixel(seesaw, pin, n, *, bpp=3, brightness=1.0, auto_write=True, pixel_order=None)[source]¶ Control NeoPixels connected to a seesaw
Parameters: - seesaw (Seesaw) – The device
 - pin (int) – The pin number on the device
 - n (int) – The number of pixels
 - bpp (int) – The number of bytes per pixel
 - brightness (float) – The brightness, from 0.0 to 1.0
 - auto_write (bool) – Automatically update the pixels when changed
 - pixel_order (tuple) – The layout of the pixels. Use one of the order constants such as RGBW.
 
- 
brightness¶ Overall brightness of the pixel
- 
adafruit_seesaw.neopixel.RGB= (0, 1, 2)¶ Red Green Blue
- 
adafruit_seesaw.neopixel.RGBW= (0, 1, 2, 3)¶ Red Green Blue White
adafruit_seesaw.pwmout¶
- 
class 
adafruit_seesaw.pwmout.PWMOut(seesaw, pin)[source]¶ A single seesaw channel that matches the
PWMOutAPI.- 
duty_cycle¶ 16-bit value that dictates how much of one cycle is high (1) versus low (0). 65535 (0xffff) will always be high, 0 will always be low, and 32767 (0x7fff) will be half high and then half low.
- 
fraction¶ Expresses duty_cycle as a fractional value. Ranges from 0.0-1.0.
- 
frequency¶ The overall PWM frequency in Hertz.
- 
 
adafruit_seesaw.robohat - Pin definition for RoboHAT¶
- 
class 
adafruit_seesaw.robohat.MM1_Pinmap[source]¶ This class is automatically used by
adafruit_seesaw.seesaw.Seesawwhen a RoboHAT board is detected.It is also a reference for the capabilities of each pin.
- 
analog_pins= (35, 34)¶ The pins capable of analog output
- 
pwm_pins= (16, 17, 18, 19, 11, 10, 9, 8, 40, 41, 42, 43)¶ The pins capable of PWM output
- 
pwm_width= 16¶ The effective bit resolution of the PWM pins
- 
touch_pins= (7, 6, 5, 4)¶ The pins capable of touch input
- 
 
adafruit_seesaw.samd09 - Pin definition for Adafruit SAMD09 Breakout with seesaw¶
- 
class 
adafruit_seesaw.samd09.SAMD09_Pinmap[source]¶ This class is automatically used by
adafruit_seesaw.seesaw.Seesawwhen a SAMD09 Breakout is detected.It is also a reference for the capabilities of each pin.
- 
analog_pins= (2, 3, 4, 5)¶ The effective bit resolution of the PWM pins
- 
pwm_pins= (4, 5, 6, 7)¶ No pins on this board are capable of touch input
- 
pwm_width= 8¶ The pins capable of PWM output
- 
 
adafruit_seesaw.tftshield18 - Pin definitions for 1.8” TFT Shield V2¶
- 
class 
adafruit_seesaw.tftshield18.Buttons(right, down, left, up, select, a, b, c)¶ - 
static 
__new__(_cls, right, down, left, up, select, a, b, c)¶ Create new instance of Buttons(right, down, left, up, select, a, b, c)
- 
__repr__()¶ Return a nicely formatted representation string
- 
a¶ Alias for field number 5
- 
b¶ Alias for field number 6
- 
c¶ Alias for field number 7
- 
down¶ Alias for field number 1
- 
left¶ Alias for field number 2
- 
right¶ Alias for field number 0
- 
select¶ Alias for field number 4
- 
up¶ Alias for field number 3
- 
static