Skip to content

Instantly share code, notes, and snippets.

View hugs's full-sized avatar
🤖
Making robots

Jason Huggins hugs

🤖
Making robots
View GitHub Profile
@hugs
hugs / focus-test.py
Last active June 15, 2023 02:59
Test for disabling autofocus on an Arducam 16MP camera.
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)
@hugs
hugs / 1_tapster_camera_setting_test.py
Last active June 15, 2023 20:14
Tapster 3 - Camera Setting Test.py
import os
import cv2
import time
# Set image resolution
# Option 1
#frame_width = 4656
#frame_height = 3496
@hugs
hugs / webserver.nim
Last active June 8, 2023 13:25
Minimal Viable Web Server in Nim
# 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.
@hugs
hugs / arducam16.mjs
Created December 7, 2022 21:26
arducam16.mjs
// 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 = {
@hugs
hugs / grbl-settings.txt
Created September 9, 2021 14:10
Grbl settings for Tapster 3
Grbl 1.1f ['$' for help]
$0=3
$1=255
$2=0
$3=0
$4=0
$5=1
$6=0
$10=1
$11=0.010
@hugs
hugs / tapster-3.coffee
Created October 1, 2020 00:23
Tapster 3 Assembly - It's okay to use CoffeeScript ☕😎
# 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
@hugs
hugs / Tapster-3-Demo.md
Last active June 8, 2023 14:36
Tapster 3 - Demo Script - Tap "Hello, World!!"
@hugs
hugs / harry-potter-hedwigs-theme.js
Created June 21, 2019 01:30
Tapster Sidekick Demo - Hedwig's Theme - Garage Band app
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],
@hugs
hugs / blink.code
Last active December 18, 2017 21:13
Blink (aka "Arduino Hello World")
@hugs
hugs / 1_clown-shoe.stl
Last active June 27, 2017 02:42
Parametric Clown Shoe! Why? Because Clown Shoe!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.