Skip to content

Instantly share code, notes, and snippets.

@18516329677
18516329677 / usb_reset.py
Created July 6, 2017 08:08 — forked from PaulFurtado/usb_reset.py
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