Skip to content

Instantly share code, notes, and snippets.

@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
@dglaude
dglaude / notes.md
Created September 24, 2022 09:06
PS2 on CircuitPython reseach

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

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
@dglaude
dglaude / adafruit_st25dv16.py
Created December 20, 2021 00:55
Writing URI into st25dv16 from CircuitPython
# SPDX-FileCopyrightText: Copyright (c) 2021 Tim Cocks for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_st25dv16`
================================================================================
CircuitPython driver for the I2C EEPROM of the Adafruit ST25DV16 Breakout
@dglaude
dglaude / code.py
Created December 1, 2021 22:03
Belgian vaccination status for MagTag
from adafruit_magtag.magtag import MagTag
from adafruit_progressbar.progressbar import ProgressBar
# BELGIUM
POPULATION = 11589616
DATA_SOURCE = "https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/vaccinations/country_data/Belgium.csv"
magtag = MagTag(url=DATA_SOURCE)
magtag.network.connect()
@dglaude
dglaude / super_multi.py
Created September 8, 2021 23:57
Multiple Buzz! controler on one Raspberry Pi.
"""
Turn on all the LEDs from each Buzz! controler one after the other.
Work with both kind of wired Buzz! controler.
Require to install hid library, not an easy task.
"""
import hid
import time
@dglaude
dglaude / simple_test.py
Created July 24, 2021 07:26
keypad simple test by @FoamyGuy found on adafruit Discord 23/07/2021
from keypad import Keys
import board
import time
pins = [board.BUTTON_A, board.BUTTON_B]
keys = Keys(pins, value_when_pressed=False, pull=True)
while True:
if keys.events.overflowed:
keys.events.clear()
@dglaude
dglaude / emojiclock
Created June 14, 2021 18:10
Tentative dynamic emoji in Discord (edit previous post and change by a different emoji every second)
# CircuitPython Discord rotating clock emoji (spam).
# Type an emoji in Discord... do nothing else, with your ItsiBitsy nrF.
# Press the button to replace that emoji by another one every second.
import time
import board
import usb_hid
from digitalio import DigitalInOut, Direction
from adafruit_hid.keyboard import Keyboard
@dglaude
dglaude / Dual_mouse_bug.py
Created June 14, 2021 16:03
Code.py found on "Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit ItsyBitsy nRF52840 Express with nRF52840" date 2020/04/14
###
# Dual BLE mouse jiggling:
# Advertise a first mouse as "CircuitPython HID1"
# Once we have a first connection
# Advertise a second mouse as "CircuitPython HID2"
#
# Once the first mouse is connected the jiggling start.
# Mouse1 should do Left-Right movement
# Mouse2 (once connected) should do Up-Down movement
#