Skip to content

Instantly share code, notes, and snippets.

@jfurcean
jfurcean / controls.py
Created Feb 7, 2021
space invaders nunchuk controls
View controls.py
import board
import digitalio
import analogio
import audioio
import audiocore
from wiichuck.nunchuk import Nunchuk
B_X = 0x01
B_O = 0x02
View adafruit_nunchuk.py
# SPDX-FileCopyrightText: 2019 Carter Nelson for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_nunchuk`
================================================================================
CircuitPython library for Nintendo Nunchuk controller
* Author(s): Carter Nelson
Implementation Notes
@jfurcean
jfurcean / COVID-19-Vaccine-MagTag.py
Last active Mar 15, 2021
Display COVID-19 Vaccine Data on a Adafruit MagTag
View COVID-19-Vaccine-MagTag.py
import time
import alarm
import supervisor
import alarm
from adafruit_magtag.magtag import MagTag
# Change this to the hour you want to check the data at, for us its 8pm
# local time (eastern), which is 20:00 hrs
DAILY_UPDATE_HOUR = 20
@jfurcean
jfurcean / COVID-19-Vaccine-MatrixPortal.py
Last active Jan 21, 2021
Display COVID-19 Vaccine Data on a Adafruit MatrixPortal
View COVID-19-Vaccine-MatrixPortal.py
# SPDX-FileCopyrightText: 2021 John Furcean
# SPDX-License-Identifier: MIT
import board
import busio
from digitalio import DigitalInOut
import adafruit_requests as requests
import adafruit_esp32spi.adafruit_esp32spi_socket as socket
from adafruit_bitmap_font import bitmap_font
from adafruit_esp32spi import adafruit_esp32spi
@jfurcean
jfurcean / CircuitPython-LockButton.py
Last active Jan 8, 2021
Computer Lock Button Using CircuitPython
View CircuitPython-LockButton.py
# SPDX-FileCopyrightText: 2021 John Furcean
# SPDX-License-Identifier: MIT
import time
import board
from digitalio import DigitalInOut, Direction, Pull
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
@jfurcean
jfurcean / qt-py-sensor-oled.py
Last active Jan 1, 2021
Using a QT PY (Haxpress), Sensor, and OLED
View qt-py-sensor-oled.py
import time
import board
import busio
import adafruit_tlv493d
import math
import displayio
import adafruit_displayio_ssd1306
import terminalio
from adafruit_display_text import label
@jfurcean
jfurcean / mute-button.py
Last active Nov 23, 2020
CircuitPython Mute Button
View mute-button.py
# SPDX-FileCopyrightText: 2020 John Furcean
# SPDX-License-Identifier: MIT
import time
import board
from digitalio import DigitalInOut, Direction, Pull
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
@jfurcean
jfurcean / COVID-19-RGB-Matrix.py
Created Nov 9, 2020
COVID-19 Data - RGB Matrix
View COVID-19-RGB-Matrix.py
# SPDX-FileCopyrightText: 2020 John Furcean
# SPDX-License-Identifier: MIT
import board
import busio
from digitalio import DigitalInOut
import adafruit_requests as requests
import adafruit_esp32spi.adafruit_esp32spi_socket as socket
from adafruit_bitmap_font import bitmap_font
from adafruit_esp32spi import adafruit_esp32spi
View smartRenew.sh
#!/bin/bash
#
# Based off ScottHelme's Lets Encrypt Smart Renew
# https://github.com/ScottHelme/Lets-Encrypt-Smart-Renew
#
# Repalce DOMAIN with the domain of the certificate you are renewing
#
# crontab
# 0 * * * * /path/to/smartRenew.sh
@jfurcean
jfurcean / 3button-keyboard.py
Last active Apr 18, 2019
3 Button Keyboard in CircuitPython for Trinket M0
View 3button-keyboard.py
# Trinket 3 Button Keyboard
import board
from digitalio import DigitalInOut, Direction, Pull
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
import adafruit_dotstar as dotstar
import time