adafruit_featherwing.alphanum_featherwing
Helper for using the 14-Segment AlphaNumeric FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.alphanum_featherwing.AlphaNumFeatherWing(address: int = 112, i2c: busio.I2C | None = None)[source]
Class representing an Adafruit 14-segment AlphaNumeric FeatherWing.
Automatically uses the feather’s I2C bus.
- property blink_rate
Blink Rate returns the current rate that the text blinks. 0 = Off 1-3 = Successively slower blink rates
- property brightness
Brightness returns the current display brightness. 0-15 = Dimmest to Brightest Setting
- fill(fill: bool)
Change all Segments on or off
- Parameters:
fill (bool) – True turns all segments on, False turns all segments off
adafruit_featherwing.dotstar_featherwing
Helper for using the DotStar FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.dotstar_featherwing.DotStarFeatherWing(clock: Pin = board.D13, data: Pin = board.D11, brightness: float = 0.2)[source]
Class representing a DotStar FeatherWing.
The feather uses pins D13 and D11
- property auto_write
Whether or not we are automatically updating If set to false, be sure to call show() to update
- property brightness
Overall brightness of the display
- fill(color: Sequence[int] = 0)
Fills all of the Pixels with a color or unlit if empty.
- Parameters:
color (list/tuple or int) – (Optional) The text or number to display (default=0)
- shift_down(rotate: bool = False)
Shift all pixels down
- Parameters:
rotate – (Optional) Rotate the shifted pixels to top (default=False)
- shift_left(rotate: bool = False)
Shift all pixels left
- Parameters:
rotate – (Optional) Rotate the shifted pixels to the right side (default=False)
- shift_right(rotate: bool = False)
Shift all pixels right
- Parameters:
rotate – (Optional) Rotate the shifted pixels to the left side (default=False)
- shift_up(rotate: bool = False)
Shift all pixels up
- Parameters:
rotate – (Optional) Rotate the shifted pixels to bottom (default=False)
- show()
Update the Pixels. This is only needed if auto_write is set to False This can be very useful for more advanced graphics effects.
adafruit_featherwing.gps_featherwing
Helper for using the Ultimate GPS FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.gps_featherwing.GPSFeatherWing(update_period: int = 1000, baudrate: int = 9600)[source]
Class representing an Ultimate GPS FeatherWing.
Automatically uses the feather’s UART bus.
- property altitude
Return the Altitude in meters
- property fix_quality
Return the Fix Quality from the GPS
- property has_fix
Return whether the GPS has a Fix on some satellites
- property height_geoid
Return the Height GeoID in meters
- property horizontal_dilution
Return the Horizontal Dilution
- property latitude
Return the Current Latitude from the GPS
- property longitude
Return the Current Longitude from the GPS
- property satellites
Return the Number of Satellites we have a fix on
- send_command(command: bytearray)[source]
Send a bytearray command to the GPS module
- Parameters:
command (bytearray) – The command to send
- property speed_knots
Return the GPS calculated speed in knots
- property speed_kph
Return the GPS calculated speed in Kilometers per Hour
- property speed_mph
Return the GPS calculated speed in Miles per Hour
- property timestamp
Return the Fix Timestamp as a struct_time
- property track_angle
Return the Tracking angle in degrees
adafruit_featherwing.ina219_featherwing
Helper for using the INA219 FeatherWing.
Author(s): Kattni Rembor
- class adafruit_featherwing.ina219_featherwing.INA219FeatherWing(i2c: busio.I2C | None = None)[source]
Class representing an Adafruit INA219 FeatherWing.
Automatically uses the feather’s I2C bus.
- property bus_voltage
Bus voltage returns volts.
This example prints the bus voltage with the appropriate units.
from adafruit_featherwing import ina219_featherwing import time ina219 = ina219_featherwing.INA219FeatherWing() while True: print("Bus Voltage: {} V".format(ina219.bus_voltage)) time.sleep(0.5)
- property current
Current returns mA.
This example prints the current with the appropriate units.
from adafruit_featherwing import ina219_featherwing import time ina219 = ina219_featherwing.INA219FeatherWing() while True: print("Current: {} mA".format(ina219.current)) time.sleep(0.5)
- property shunt_voltage
Shunt voltage returns volts.
This example prints the shunt voltage with the appropriate units.
from adafruit_featherwing import ina219_featherwing import time ina219 = ina219_featherwing.INA219FeatherWing() while True: print("Shunt Voltage: {} V".format(ina219.shunt_voltage)) time.sleep(0.5)
- property voltage
Voltage, known as load voltage, is bus voltage plus shunt voltage. Returns volts.
This example prints the voltage with the appropriate units.
from adafruit_featherwing import ina219_featherwing import time ina219 = ina219_featherwing.INA219FeatherWing() while True: print("Voltage: {} V".format(ina219.voltage)) time.sleep(0.5)
adafruit_featherwing.joy_featherwing
Helper for using the Joy FeatherWing.
Author(s): Kattni Rembor
- class adafruit_featherwing.joy_featherwing.JoyFeatherWing(i2c: busio.I2C | None = None)[source]
Class representing an Adafruit Joy FeatherWing.
Automatically uses the feather’s I2C bus.
- property button_a
Joy featherwing button A.
This example prints when button A is pressed.
from adafruit_featherwing import joy_featherwing import time wing = joy_featherwing.JoyFeatherWing() while True: if wing.button_a: print("Button A pressed!")
- property button_b
Joy featherwing button B.
This example prints when button B is pressed.
from adafruit_featherwing import joy_featherwing import time wing = joy_featherwing.JoyFeatherWing() while True: if wing.button_b: print("Button B pressed!")
- property button_select
Joy featherwing button SELECT.
This example prints when button SELECT is pressed.
from adafruit_featherwing import joy_featherwing import time wing = joy_featherwing.JoyFeatherWing() while True: if wing.button_select: print("Button SELECT pressed!")
- property button_x
Joy featherwing button X.
This example prints when button X is pressed.
from adafruit_featherwing import joy_featherwing import time wing = joy_featherwing.JoyFeatherWing() while True: if wing.button_x: print("Button X pressed!")
- property button_y
Joy featherwing button Y.
This example prints when button Y is pressed.
from adafruit_featherwing import joy_featherwing import time wing = joy_featherwing.JoyFeatherWing() while True: if wing.button_y: print("Button Y pressed!")
- property joystick
Joy FeatherWing joystick.
This example zeros the joystick, and prints the coordinates of joystick when it is moved.
from adafruit_featherwing import joy_featherwing import time wing = joy_featherwing.JoyFeatherWing() last_x = 0 last_y = 0 wing.zero_joystick() while True: x, y = wing.joystick if (abs(x - last_x) > 3) or (abs(y - last_y) > 3): last_x = x last_y = y print(x, y) time.sleep(0.01)
- property joystick_offset
Offset used to correctly report (0, 0) when the joystick is centered.
Provide a tuple of (x, y) to set your joystick center to (0, 0). The offset you provide is subtracted from the current reading. For example, if your joystick reads as (-4, 0), you would enter (-4, 0) as the offset. The code will subtract -4 from -4, and 0 from 0, returning (0, 0).
This example supplies an offset for zeroing, and prints the coordinates of the joystick when it is moved.
from adafruit_featherwing import joy_featherwing import time wing = joy_featherwing.JoyFeatherWing() last_x = 0 last_y = 0 while True: wing.joystick_offset = (-4, 0) x, y = wing.joystick if (abs(x - last_x) > 3) or (abs(y - last_y) > 3): last_x = x last_y = y print(x, y) time.sleep(0.01)
- zero_joystick()[source]
Zeros the joystick by using current reading as (0, 0). Note: You must not be touching the joystick at the time of zeroing for it to be accurate.
This example zeros the joystick, and prints the coordinates of joystick when it is moved.
from adafruit_featherwing import joy_featherwing import time wing = joy_featherwing.JoyFeatherWing() last_x = 0 last_y = 0 wing.zero_joystick() while True: x, y = wing.joystick if (abs(x - last_x) > 3) or (abs(y - last_y) > 3): last_x = x last_y = y print(x, y) time.sleep(0.01)
adafruit_featherwing.keyboard_featherwing
Helper for using the Keyboard Featherwing.
Author(s): Foamyguy
Requires: * adafruit_ili9341 * adafruit_stmpe610
- class adafruit_featherwing.keyboard_featherwing.KeyboardFeatherwing(spi: busio.SPI | None = None, cs: Pin | None = None, dc: Pin | None = None, i2c: busio.I2C | None = None, ts_cs: Pin | None = None, sd_cs: Pin | None = None, neopixel_pin: Pin | None = None)[source]
Class representing a Keyboard Featherwing.
- keyboard
BBQ10Keyboard instance.
- neopixel
Status NeoPixel.
adafruit_featherwing.matrix_featherwing
Helper for using the Adafruit 8x16 LED Matrix FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.matrix_featherwing.MatrixFeatherWing(address: int = 112, i2c: busio.I2C | None = None)[source]
Class representing an Adafruit 8x16 LED Matrix FeatherWing.
Automatically uses the feather’s I2C bus.
- property blink_rate
Blink Rate returns the current rate that the pixels blink. 0 = Not Blinking 1-3 = Successively slower blink rates
- property brightness
Brightness returns the current display brightness. 0-15 = Dimmest to Brightest Setting
- fill(fill: bool)[source]
Turn all pixels on or off
- Parameters:
fill (bool) – True turns all pixels on, False turns all pixels off
- pixel(x: int, y: int, color: bool | None = None) bool | None [source]
Turn a pixel on or off or retrieve a pixel value
- shift_down(rotate: bool = False)[source]
Shift all pixels down
- Parameters:
rotate – (Optional) Rotate the shifted pixels to top (default=False)
- shift_left(rotate: bool = False)[source]
Shift all pixels left
- Parameters:
rotate – (Optional) Rotate the shifted pixels to the right side (default=False)
- shift_right(rotate: bool = False)[source]
Shift all pixels right
- Parameters:
rotate – (Optional) Rotate the shifted pixels to the left side (default=False)
adafruit_featherwing.minitft_featherwing
Helper for using the Mini Color TFT with Joystick FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.minitft_featherwing.Buttons(up, down, left, right, a, b, select)
- a
Alias for field number 4
- b
Alias for field number 5
- down
Alias for field number 1
- left
Alias for field number 2
- right
Alias for field number 3
- select
Alias for field number 6
- up
Alias for field number 0
- class adafruit_featherwing.minitft_featherwing.MiniTFTFeatherWing(address: int = 94, i2c: busio.I2C | None = None, spi: busio.SPI | None = None, cs_pin: Pin | None = None, dc_pin: Pin | None = None)[source]
Class representing an Mini Color TFT with Joystick FeatherWing.
Automatically uses the feather’s I2C bus.
- property backlight
Return the current backlight duty cycle value
- property buttons
Return a set of buttons with current push values
adafruit_featherwing.neopixel_featherwing
Helper for using the NeoPixel FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.neopixel_featherwing.NeoPixelFeatherWing(pixel_pin: Pin = board.D6, brightness: float = 0.1)[source]
Class representing a NeoPixel FeatherWing.
The feather uses pins D6 by default
- property auto_write
Whether or not we are automatically updating If set to false, be sure to call show() to update
- property brightness
Overall brightness of the display
- fill(color: Sequence[int] = 0)
Fills all of the Pixels with a color or unlit if empty.
- Parameters:
color (list/tuple or int) – (Optional) The text or number to display (default=0)
- shift_down(rotate: bool = False)[source]
Shift all pixels down.
- Parameters:
rotate – (Optional) Rotate the shifted pixels to top (default=False)
This example shifts 2 pixels down
import time from adafruit_featherwing import neopixel_featherwing neopixel = neopixel_featherwing.NeoPixelFeatherWing() # Draw Red and Green Pixels neopixel[4, 1] = (255, 0, 0) neopixel[5, 1] = (0, 255, 0) # Rotate it off the screen for i in range(0, neopixel.rows - 1): neopixel.shift_down(True) time.sleep(.1) time.sleep(1) # Shift it off the screen for i in range(0, neopixel.rows - 1): neopixel.shift_down() time.sleep(.1)
- shift_left(rotate: bool = False)
Shift all pixels left
- Parameters:
rotate – (Optional) Rotate the shifted pixels to the right side (default=False)
- shift_right(rotate: bool = False)
Shift all pixels right
- Parameters:
rotate – (Optional) Rotate the shifted pixels to the left side (default=False)
- shift_up(rotate: bool = False)[source]
Shift all pixels up
- Parameters:
rotate – (Optional) Rotate the shifted pixels to bottom (default=False)
This example shifts 2 pixels up
import time from adafruit_featherwing import neopixel_featherwing neopixel = neopixel_featherwing.NeoPixelFeatherWing() # Draw Red and Green Pixels neopixel[4, 1] = (255, 0, 0) neopixel[5, 1] = (0, 255, 0) # Rotate it off the screen for i in range(0, neopixel.rows - 1): neopixel.shift_up(True) time.sleep(.1) time.sleep(1) # Shift it off the screen for i in range(0, neopixel.rows - 1): neopixel.shift_up() time.sleep(.1)
- show()
Update the Pixels. This is only needed if auto_write is set to False This can be very useful for more advanced graphics effects.
adafruit_featherwing.rtc_featherwing
Helper for using the DS3231 Precision RTC FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.rtc_featherwing.RTCFeatherWing(i2c: busio.I2C | None = None)[source]
Class representing an DS3231 Precision RTC FeatherWing.
Automatically uses the feather’s I2C bus.
- property datetime
Passthru property to the ds3231 library for compatibility
- property day
The Current Day
- get_month_days(month: int | None = None, year: int | None = None) int [source]
Return the number of days for the month of the given year
- property hour
The Current Hour
- is_leap_year(year: int | None = None) bool [source]
Check if the year is a leap year
- Parameters:
year (int) – (Optional) The year to check. If none is provided, current year is used.
- property minute
The Current Minute
- property month
The Current Month
- property now
The Current Date and Time in Named Tuple Style (Read Only)
- property second
The Current Second
- property unixtime
The Current Date and Time in Unix Time
- property weekday
The Current Day of the Week Value (0-6) where Sunday is 0
- property year
The Current Year
adafruit_featherwing.sevensegment_featherwing
Helper for using the 7-Segment LED HT16K33 FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.sevensegment_featherwing.SevenSegmentFeatherWing(address: int = 112, i2c: busio.I2C | None = None)[source]
Class representing an Adafruit 7-Segment LED HT16K33 FeatherWing.
Automatically uses the feather’s I2C bus.
- property blink_rate
Blink Rate returns the current rate that the text blinks. 0 = Off 1-3 = Successively slower blink rates
- property brightness
Brightness returns the current display brightness. 0-15 = Dimmest to Brightest Setting
- fill(fill: bool)
Change all Segments on or off
- Parameters:
fill (bool) – True turns all segments on, False turns all segments off
adafruit_featherwing.tempmotion_featherwing
Helper for using the Adafruit ADXL343 + ADT7410 Sensor FeatherWing.
Author(s): Melissa LeBlanc-Williams
- class adafruit_featherwing.tempmotion_featherwing.TempMotionFeatherWing(adxl343_address: int = 83, adt7410_address: int = 72, i2c: int | None = None)[source]
Class helper representing an Adafruit ADXL343 + ADT7410 Sensor FeatherWing.
Automatically uses the feather’s I2C bus.
- property acceleration
Returns the ADXL343 Acceleration
- property configuration
Returns the ADT7410 Configuration
- property data_rate
The data rate of the sensor.
- property events
Returns the ADXL343 Enabled Events
- property range
The measurement range of the sensor.
- property status
Returns the ADT7410 Status
- property temperature
Returns ADT7410 Temperature
adafruit_featherwing.tft_featherwing_24
Helper for using the TFT FeatherWing 2.4”.
Author(s): Melissa LeBlanc-Williams, Foamyguy
Requires: * adafruit_ili9341 * adafruit_stmpe610
- class adafruit_featherwing.tft_featherwing_24.TFTFeatherWing24(spi: busio.SPI | None = None, cs: Pin | None = None, dc: Pin | None = None, ts_cs: Pin | None = None, sd_cs: Pin | None = None)[source]
Class representing a TFT FeatherWing 2.4 V1 Attempts to mount the SD card to /sd.
- display
Display object for the FeatherWing’s screen.
- class adafruit_featherwing.tft_featherwing_24.TFTFeatherWing24V2(spi: busio.SPI | None = None, cs_pin: Pin | None = None, dc_pin: Pin | None = None, sd_cs_pin: Pin | None = None, i2c: busio.I2C | None = None)[source]
Class representing a TFT FeatherWing 2.4 V2. Attempts to mount the SD card to /sd.
- display
Display object for the FeatherWing’s screen.
adafruit_featherwing.tft_featherwing_35
Helper for using the TFT FeatherWing 3.5”.
Author(s): Melissa LeBlanc-Williams, Foamyguy
Requires: * adafruit_hx8357 * adafruit_stmpe610
- class adafruit_featherwing.tft_featherwing_35.TFTFeatherWing35(spi: busio.SPI | None = None, cs: Pin | None = None, dc: Pin | None = None, ts_cs: Pin | None = None, sd_cs: Pin | None = None)[source]
Class representing a TFT FeatherWing 3.5 V1 Attempts to mount the SD card to /sd.
- display
Display object for the FeatherWing’s screen.
- class adafruit_featherwing.tft_featherwing_35.TFTFeatherWing35V2(spi: busio.SPI | None = None, cs_pin: Pin | None = None, dc_pin: Pin | None = None, sd_cs_pin: Pin | None = None, i2c: busio.I2C | None = None)[source]
Class representing a TFT FeatherWing 3.5 V2. Attempts to mount the SD card to /sd.
- display
Display object for the FeatherWing’s screen.