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 board | |
import digitalio | |
import time | |
import neopixel | |
PWM_BLINK_RATE = 0.5 # seconds | |
LED_FADE_STEPS = 400 # 400 steps = 100 for each of: | |
# red_fade_up, red_fade_down, blue_fade_up, blue_fade_down |
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
""" | |
Using time.monotonic() to blink the built-in LED. | |
Instead of "wait until" think "Is it time yet?" | |
""" | |
import time | |
import digitalio | |
import board | |
# How long we want the LED to stay on |
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 board | |
import digitalio | |
import time | |
BLINK_LIST = [ | |
{ | |
"ON": 0.25, | |
"OFF": 0.25, | |
"PREV_TIME": -1, | |
"PIN": board.D5, |
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 | |
from board import SCL, SDA | |
import busio | |
from adafruit_apds9960.apds9960 import APDS9960 | |
import usb_hid | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS | |
from adafruit_hid.keycode import Keycode | |
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
# Circuit Playground 808 Drum machine | |
import time | |
import board | |
import touchio | |
import digitalio | |
import neopixel | |
from adafruit_circuitplayground import cp | |
from adafruit_led_animation.animation.comet import Comet | |
from adafruit_led_animation.color import BLUE |
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
# Circuit Playground 808 Drum machine | |
import time | |
import board | |
import touchio | |
import digitalio | |
import neopixel | |
#from adafruit_circuitplayground import cp | |
from adafruit_led_animation.animation.comet import Comet | |
from adafruit_led_animation.color import BLUE |
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
# Circuit Playground 808 Drum machine | |
import time | |
import board | |
import touchio | |
import digitalio | |
import neopixel | |
from adafruit_led_animation.animation.comet import Comet | |
from adafruit_led_animation.color import BLUE |
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 displayio | |
class GridLayout(displayio.Group): | |
def __init__( | |
self, | |
x, | |
y, | |
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 os | |
import board | |
import displayio | |
from adafruit_bitmap_font import bitmap_font | |
from adafruit_button import Button | |
import adafruit_touchscreen | |
from grid_layout import GridLayout | |
# These pins are used as both analog and digital! XL, XR and YU must be analog | |
# and digital capable. YD just need to be digital |
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
# Thermal_Cam_v32.py | |
# 2020-01-29 v3.2 | |
# (c) 2020 Jan Goolsbey for Adafruit Industries | |
import time | |
import board | |
import displayio | |
from simpleio import map_range | |
from adafruit_display_text.label import Label | |
from adafruit_bitmap_font import bitmap_font |