https://twitter.com/hugs/status/1291798092950441990
python3 -m venv env
source env/bin/activate
#include "Touch.h" | |
#if defined(_USING_HID) | |
#define CONTACT_COUNT_MAXIMUM 10 | |
#define REPORTID_TOUCH 0x04 | |
#define LSB(v) ((v >> 8) & 0xff) | |
#define MSB(v) (v & 0xff) |
# To run script and start an interactive session (REPL): | |
# $ python -i demo.py --host=http://localhost:5000 | |
import cv2 | |
import os | |
import sys | |
import shutil | |
import time | |
import json | |
import sys |
import cv2 | |
cap = cv2.VideoCapture(0) | |
# You *must* grab at least frame before focus settings take effect. | |
# Try commenting and uncommenting the following line to test it | |
grabbed, frame = cap.read() | |
cap.set(cv2.CAP_PROP_AUTOFOCUS, 0) | |
cap.set(cv2.CAP_PROP_FOCUS, 460) |
import os | |
import cv2 | |
import time | |
# Set image resolution | |
# Option 1 | |
#frame_width = 4656 | |
#frame_height = 3496 |
# Minimal Viable Web Server for Nim | |
# 1) Install Nim: | |
# https://nim-lang.org/install.html | |
# 2) To run, enter this in a terminal window: | |
# nim c -r webserver.nim | |
# 3) Press Control-C to quit / stop the server. |
// https://github.com/qweasd1/node-uvc-control (npm uvc-control2) | |
// Example | |
// import { Control } from './arducam16.mjs' | |
// var control = new Control({width: this.config.width, height: this.config.height}) | |
// control.init() | |
import UVCControl from 'uvc-control2' | |
const defaults = { |
Grbl 1.1f ['$' for help] | |
$0=3 | |
$1=255 | |
$2=0 | |
$3=0 | |
$4=0 | |
$5=1 | |
$6=0 | |
$10=1 | |
$11=0.010 |
# Tapster 3 Assembly | |
# (c) 2020 Jason R. Huggins | |
# It's okay to use CoffeeScript ☕ | |
# No, really, pi is wrong | |
Math.TAU = Math.PI*2 | |
arm_offset = Math.acos(69.912/70) / Math.TAU * 360 | |
servo_height_offset = (-28.5 / 2) - 5 | |
servo_width_offset = 44.6 / 2 |
https://twitter.com/hugs/status/1291798092950441990
python3 -m venv env
source env/bin/activate
notes = { | |
'C': [54,130], | |
'D': [44,130], | |
'E': [34,130], | |
'F': [24,130], | |
'G': [16,130], | |
'A': [6,130], | |
'B': [-3,130], | |
'c': [-13,130], | |
'd': [-23,130], |