This file contains hidden or 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 storage | |
from os import * | |
def get_mount_for(path): | |
path = path.rstrip("/") | |
if path[0] != "/": | |
path = os.getcwd() + "/" + path | |
while len(path) > 0: | |
try: | |
return storage.getmount(path) |
This file contains hidden or 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: 2022 Neradoc [email protected] | |
# SPDX-License-Identifier: MIT | |
""" | |
This file was automatically generated using Circuitpython_Keyboard_Layouts | |
""" | |
from adafruit_hid.keyboard_layout_base import KeyboardLayoutBase | |
__version__ = "0.0.0-auto.0" | |
__repo__ = "https://github.com/Neradoc/Circuitpython_Keyboard_Layouts.git" |
This file contains hidden or 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: Copyright (c) 2022 brainelectronics and contributors | |
# SPDX-License-Identifier: MIT | |
""" | |
Implementation to interact with Winbond W25Q Flash with software reset. | |
Credits & kudos to crizeo | |
Taken from https://forum.micropython.org/viewtopic.php?f=16&t=3899 | |
Converted from https://github.com/brainelectronics/micropython-winbond | |
""" |
This file contains hidden or 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
""" | |
Resilient HID: | |
Test at the start to wait for the USB connection to be available | |
""" | |
import microcontroller | |
import supervisor | |
import time | |
# wait for connection | |
while not supervisor.runtime.usb_connected: |
This file contains hidden or 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 neopixel | |
import board | |
import math | |
import adafruit_rgbled | |
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1) | |
pixel.fill((255, 0, 255)) |
This file contains hidden or 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 struct | |
from adafruit_bus_device.spi_device import SPIDevice | |
__version__ = '0.1.0' | |
WAIT = -1 | |
BG_CS_FRONT_BCM = 7 | |
BG_CS_BACK_BCM = 8 |
This file contains hidden or 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 displayio | |
import time | |
import vectorio | |
display = board.DISPLAY | |
splash = displayio.Group(x=0, y=0, scale=1) | |
display.show(splash) | |
color_palette = displayio.Palette(2) |
This file contains hidden or 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
# Make sure you install pyusb and libusb on your system yo | |
import usb.core | |
import usb.util | |
import usb.control | |
HID_INTERFACE = 0x02 | |
INPUT_ENDPOINT = 0x83 | |
OUTPUT_ENDPOINT = 0x3 | |
HID_PKT_SIZE = 64 |
This file contains hidden or 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-FileCopyrightText: 2023 Neradoc https://neradoc.me | |
# SPDX-License-Identifier: MIT | |
""" | |
A somewhat hacky attempt at scrolling text on the IS31FL3741 13x9 Matrix | |
https://www.adafruit.com/product/5201 | |
""" | |
import time | |
import board | |
from rainbowio import colorwheel |
This file contains hidden or 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: 2023 Neradoc | |
# SPDX-License-Identifier: MIT | |
"""Show text from the web page on a display""" | |
import board | |
import json | |
import mdns | |
import microcontroller | |
import socketpool | |
import time | |
import traceback |
NewerOlder