Skip to content

Instantly share code, notes, and snippets.

# Drive NeoPixels on the NeoPixels Block on Crickit FeatherWing
import time
from adafruit_crickit import crickit
from adafruit_seesaw.neopixel import NeoPixel
num_pixels = 30 # Number of pixels driven from Crickit NeoPixel terminal
# The following line sets up a NeoPixel strip on Seesaw pin 20 for Feather
pixels = NeoPixel(crickit.seesaw, 20, num_pixels)
# Crickit library demo - NeoPixel terminal
# Note: On CPX Crickit, NeoPixel pin is normally connected to A1, not to seesaw,
# so this demo would not control the NeoPixel terminal.
# On the Crickit FeatherWing, the NeoPixel terminal is controlled by seesaw.
# pylint can't figure out "pixel" can be indexed.
# pylint: disable=unsupported-assignment-operation
import time
from adafruit_crickit import crickit
import board
from digitalio import DigitalInOut, Direction, Pull
import adafruit_dotstar as dotstar
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from miniKbdButtons import MiniKbdButtons

ones I merged:

Skipped these:

# Digital sand demo uses the accelerometer to move sand particles in a
# realistic way. Tilt the board to see the sand grains tumble around and light
# up LEDs. Based on the code created by Phil Burgess and Dave Astels, see:
# https://learn.adafruit.com/digital-sand-dotstar-circuitpython-edition/code
# https://learn.adafruit.com/animated-led-sand
# Ported to NeoTrellis M4 by John Thurmond.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
import os
import board
import digitalio
import gamepad
import adafruit_imageload
import time
from time import sleep
import terminalio
from adafruit_display_text import label
from adafruit_button import Button
# adafruit_requests usage with an esp32spi_socket
import board
import busio
from digitalio import DigitalInOut
import adafruit_esp32spi.adafruit_esp32spi_socket as socket
from adafruit_esp32spi import adafruit_esp32spi
import adafruit_requests as requests
from secrets import secrets
# If you are using a board with pre-defined ESP32 Pins:
from adafruit_hid.mouse import Mouse
import time
import board
import touchio
import usb_hid
mouse = Mouse(usb_hid.devices)
# Modified 'Cyber falls' sketch: https://learn.adafruit.com/neopixel-cyber-falls/circuitpython-code
#
# This version expects to execute one step of he animation
# at a time. This makes it easier to integrate with other animations
# running simultaneously.
import time
import board
import neopixel
import adafruit_fancyled.adafruit_fancyled as fancy
import board
import time
import digitalio
from adafruit_debouncer import Debouncer
from adafruit_pybadger import pybadger
b_btn = Debouncer(lambda: pybadger.button.b == 0)
a_btn = Debouncer(lambda: pybadger.button.a == 0)
up_btn = Debouncer(lambda: pybadger.button.up == 0)
down_btn = Debouncer(lambda: pybadger.button.down == 0)