Skip to content

Instantly share code, notes, and snippets.

View seantibor's full-sized avatar

Sean Tibor seantibor

View GitHub Profile
@seantibor
seantibor / infinite_generator_neopixel.py
Created May 31, 2019 15:12
uses the Adafruit wheel function and a generator to iterate back and forth over a range of colors.
from adafruit_circuitplayground.express import cpx
import time
def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if pos < 0 or pos > 255:
return (0, 0, 0)
if pos < 85:
return (255 - pos * 3, pos * 3, 0)
@seantibor
seantibor / code.py
Created May 4, 2019 11:41
PyPortal conference badge for #PyCon2019
"""
This example will set up a simple conference badge with two different screens and a QR code.
"""
import time
import board
from adafruit_pyportal import PyPortal
import adafruit_touchscreen
# the current working directory (where this file is)