Skip to content

Instantly share code, notes, and snippets.

View jfurcean's full-sized avatar

John Furcean jfurcean

View GitHub Profile
@jfurcean
jfurcean / controls.py
Created February 7, 2021 16:09
space invaders nunchuk controls
import board
import digitalio
import analogio
import audioio
import audiocore
from wiichuck.nunchuk import Nunchuk
B_X = 0x01
B_O = 0x02
@jfurcean
jfurcean / code.py
Created April 17, 2021 16:45
CPX Mute Example
from adafruit_circuitplayground import cp
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
import usb_hid
import time
GREEN = (0,255,0)
RED = (255,0,0)
cp.pixels.brightness = .1
@jfurcean
jfurcean / seesaw_rotary_encoder.py
Last active May 12, 2021 14:10
CircuitPythyon Simple i2C Seesaw Rotary Enocder
import board
import busio
from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.digitalio import DigitalIO
from adafruit_seesaw.neopixel import NeoPixel
import struct
_ENCODER_BASE = 0x11
_ENCODER_POSITION = 0x30
@jfurcean
jfurcean / boot.py
Last active April 2, 2022 17:04
Wii Classic Controller as HID Gamepad
# boot.py
import usb_hid
# This is only one example of a gamepad descriptor.
# It may not suit your needs, or be supported on your host computer.
GAMEPAD_REPORT_DESCRIPTOR = bytes((
0x05, 0x01, # Usage Page (Generic Desktop Ctrls)
0x09, 0x05, # Usage (Game Pad)
0xA1, 0x01, # Collection (Application)