Skip to content

Instantly share code, notes, and snippets.

import serial
import serial.tools.list_ports
from playsound import playsound
import time
def getSerial():
pid = "67"
vid = "9025"
ports=serial.tools.list_ports.comports(include_links=False)
for p in ports:
@bhwarren
bhwarren / rotateStepper.py
Last active November 20, 2019 01:34
rotate the stepper motor attached to the raspberry pi, specifying revolutions in halfstep sequences
import RPi.GPIO as GPIO
import time
import sys
args = sys.argv[1:]
GPIO.setmode(GPIO.BOARD)
controlPins = [7,11,13,15]
for pin in controlPins:
@bhwarren
bhwarren / sc-discourse-hider.js
Created May 27, 2017 03:16
Hide content for more focus on the SuttaCentral Discourse EBT discussions
// ==UserScript==
// @name SuttaCentral Discourse Content Hider
// @namespace http://tampermonkey.net/
// @version 0.8
// @description Hide content for more focus on the EBTs
// @author You
// @match https://discourse.suttacentral.net/*
// @grant none
// @require http://gist.githubusercontent.com/BrockA/2625891/raw/waitForKeyElements.js
@bhwarren
bhwarren / chanelog
Last active May 16, 2021 04:35
Package manager wrapper script. Supports Yum, Apt, and Pacman/Packer
To-Do:
add "-r" || "--repositories" || "--repos" to only update the repos