Skip to content

Instantly share code, notes, and snippets.

foamyguy FoamyGuy

Block or report user

Report or block FoamyGuy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pybadger_debouncing_example.py
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)
View cyberfall_with_blinky.py
# 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
View mouse_example.py
from adafruit_hid.mouse import Mouse
import time
import board
import touchio
import usb_hid
mouse = Mouse(usb_hid.devices)
View circuitpython_ifttt_event_post.py
# 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:
View pyportal_app_launcher_attempt.py
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
View code_neotrellis_m4_sand.py
# 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
View pylint_black_merging_notes.md

ones I merged:

Skipped these:

View edited_macro_pad.py
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
View ramp_brightness.py
# 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
View feather_crickit_neopixels.py
# 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)
You can’t perform that action at this time.