This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# staroids_code.py -- fakey Almost Asteroids | |
# 4 Aug 2021 - @todbot | |
# This is just a sketch, the full version of this idea is at https://github.com/todbot/circuitpython_staroids | |
import board, time, math, random | |
import displayio, terminalio, bitmaptools | |
import adafruit_imageload | |
import bitmaptools | |
import digitalio | |
button_L = digitalio.DigitalInOut(board.BUTTON_UP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# random_notes_scale2.py - play random melody in scale, w/ LEDS & LCD accompaniment | |
# 16 Jul 2021 - @todbot | |
import time, random, math | |
import board, digitalio, pwmio | |
import adafruit_dotstar # or neopixel | |
import displayio, terminalio | |
from adafruit_display_text import label | |
leds = adafruit_dotstar.DotStar(board.DOTSTAR_CLOCK, board.DOTSTAR_DATA, 5, brightness=0.1) | |
mylabel = label.Label(terminalio.FONT, text="Music???", x=40,y=50, scale=4, color=0xff00ff) | |
display = board.DISPLAY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import board | |
from keybow2040 import Keybow2040, number_to_xy, hsv_to_rgb | |
import usb_cdc | |
# Some constants | |
FULLBRIGHT = 1 | |
MINBRIGHT = 0.05 | |
# Set up Keybow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AMG8833 thermal camera on an ILI9341 320x240 screen | |
# Michael Horne, based on Jan Goolsbey's code for Adafruit | |
# https://learn.adafruit.com/pygamer-thermal-camera-amg8833?view=all | |
import time | |
import board | |
import displayio | |
import busio | |
from simpleio import map_range | |
from adafruit_display_text.label import Label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries | |
# SPDX-License-Identifier: MIT | |
# Customised by David Glaude for Michael Horne | |
# Download the latest version of the IS31FL3731 library: https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/archive/master.zip | |
# soon available from https://circuitpython.org/libraries in the "Bundle Version 6.x" | |
# Also take the adafruit_framebuf too from the library bundle | |
# | |
# Download the font font5x8.bin from https://github.com/adafruit/Adafruit_CircuitPython_framebuf/blob/master/examples/font5x8.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mport board | |
import digitalio | |
import busio | |
import random | |
import time | |
class RGBKeyPad: | |
WIDTH=4 | |
HEIGHT=4 | |
NUMPADS=WIDTH*HEIGHT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import board | |
import busio | |
import usb_hid | |
from adafruit_bus_device.i2c_device import I2CDevice | |
import adafruit_dotstar | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import time | |
import board | |
import displayio | |
import rtc | |
import socketpool | |
import terminalio | |
import wifi | |
from adafruit_display_text import label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Time libraries | |
import rtc | |
import time | |
import alarm # for sleep and deep sleep | |
# Adafruit hts221 and supporting libraries | |
import board | |
import busio | |
import adafruit_hts221 # this library is dependent on adafruit_bus_device and adafruit_register |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root (use sudo)" 1>&2 | |
exit 1 | |
fi | |
sudo apt-get install cifs-utils |
NewerOlder