Skip to content

Instantly share code, notes, and snippets.

@PaulFurtado
PaulFurtado / usb_reset.py
Last active June 22, 2024 22:44
Reset USB device from python
"""
Example code for resetting the USB port that a Teensy microcontroller is
attached to. There are a lot of situations where a Teensy or Arduino can
end up in a bad state and need resetting, this code is useful for
"""
import os
import fcntl
import subprocess