Skip to content

Instantly share code, notes, and snippets.

@vmedea
vmedea / dragonrise_hid.txt
Created November 15, 2020 09:04
USB hid descriptor for DragonRise Inc. GameCube Controller Adapter
Bus 001 Device 006: ID 0079:1846 DragonRise Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0079 DragonRise Inc.
@vmedea
vmedea / iConsole.py
Last active June 2, 2021 12:25
Communicate with an iConsole exercise bike using BLE and pygatt
# This was moved to https://github.com/vmedea/iconsole
@vmedea
vmedea / heartrate.py
Created October 20, 2020 15:07
Bluetooth LE heartrate sensor communication for ULX3S ESP32
# Bluetooth LE heartrate sensor communication
#
# Connect to the first available Bluetooth LE heartrate sensor, subscribes to
# notifications, then sends the values to the FPGA through the UART in single-byte packets.
#
# Mara "vmedea" 2020
# SPDX-License-Identifier: MIT
from binascii import hexlify
from micropython import const
from machine import UART
/*
* Copyright (c) 2012 Kevin P. Willard
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
@vmedea
vmedea / draculamod.vim
Created March 2, 2019 10:26
vim theme
" Based on Dracula Theme v1.2.7
"
" https://github.com/zenorocha/dracula-theme
"
" Copyright 2016, All rights reserved
"
" Code licensed under the MIT license
" http://zenorocha.mit-license.org
"
" @author Trevor Heins <@heinst>