Skip to content

Instantly share code, notes, and snippets.

@dglaude
dglaude / code.py
Created March 19, 2023 13:41
S2 PICO V1.0.0 WEMOS.CC testing: board.DISPLAY
View code.py
# Import all board pins.
import board
import busio
import time
import displayio
import adafruit_displayio_ssd1306
import vectorio
displayio.release_displays()
@dglaude
dglaude / boot.py
Created February 8, 2023 20:53
Mouse jiggler with speed control of the rotation, and only visible as mouse if boot.py is selected.
View boot.py
import storage, usb_cdc
import board, digitalio
import usb_hid, usb_midi
# On the Macropad, pressing a key grounds it. You need to set a pull-up.
# If not pressed, the key will be at +V (due to the pull-up).
button = digitalio.DigitalInOut(board.KEY12)
button.pull = digitalio.Pull.UP
# Disable devices only if button is not pressed.
@dglaude
dglaude / code.py
Created October 18, 2022 22:03
Seeeduino XIAO RP2040: Build in RGB LED simultaniously as NeoPixel.
View code.py
"""Seeeduino XIAO RP2040: Build in RGB LED simultaniously as NeoPixel."""
import time
import board
import neopixel
import digitalio
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
@dglaude
dglaude / code.py
Created September 27, 2022 21:25
PASsive aggRESiVE writING with CirCUITPYthon (i diD IT oN A QT pY M0)
View code.py
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
import time
import random
# Initialize Keyboard
kbd = Keyboard(usb_hid.devices)
# Press and release CapsLock in loop.
@dglaude
dglaude / notes.md
Last active September 26, 2022 19:58
WebHID research notes
@dglaude
dglaude / camera.md
Created September 26, 2022 17:43
Should we have camera as a feature in CircuitPython download and what board?
View camera.md
@dglaude
dglaude / notes.md
Created September 25, 2022 20:20
PS2DEV (how to emulate PS2 with Arduino)
@dglaude
dglaude / notes.md
Created September 24, 2022 21:24
USB Host in CircuitPython
View notes.md
@dglaude
dglaude / notes.md
Created September 24, 2022 09:06
PS2 on CircuitPython reseach
View notes.md

PS2 is a old PC keyboard (and mouse) connector/protocol used prior to USB. It is still available on some PC mother board. The protocol is serial and run at 5V, so it require electronic if your microprocessor is 3V.

Support for CircuitPython was added by user elvis-epx with the PR: adafruit/circuitpython#1893

The process to add PS2 protocol to CircuitPython was documented by the author: https://epxx.co/artigos/howto.html

Here is the CircuitPython documentation: https://docs.circuitpython.org/en/latest/shared-bindings/ps2io/index.html

@dglaude
dglaude / T-Watch_2020_compare.md
Last active August 30, 2022 07:21
Compare T-Watch 2020 v1, v2 and v3 pinout
View T-Watch_2020_compare.md

V1 vs V2 vs V3

1.Pinout table

Peripherals T-Watch2020 V1 T-Watch2020 V2 T-Watch2020 V3 NOTES
Core ESP32-DOWDQ6 ESP32-DOWDQ6 ESP32-DOWDQ6
Flash 16MB 16MB 16MB
SPRAM 8MB 4MB 8MB WARNING
TOUCH Driver FT6336 FT6336 FT6336