Arudino programs to test running a 4 wire PWM fan
Brewfile.lock.json |
tell application "Calendar" to quit | |
delay 2 | |
tell application "Calendar" | |
activate | |
end tell | |
tell application "System Events" | |
delay 2 -- Wait for Calendar to activate | |
key down {command} | |
keystroke "p" -- Command + P to print | |
key up {command} |
Documentation for Gcodes
https://discord.com/channels/956636378458898542/1033511859044765807/1086769991782764645
SENDING:M3001
+ringbuf:1,512,0
Digispark doesn't allow using the normal Serial.println()
that an arduino uses becuase it doesn't show up as a com port.
Instead you need to use hidapitester
or https://github.com/Bluebie/digiusb.rb ruby app to read from USB data.
Digispark has VID/PID
of 16C0/05DF
Start the digterm ruby app and enter 1
in the terminal.
When 1 is pressed, the blue LED (pin 1) should turn on for 1/10 of a second
Tesmart KVM have a RS232 connection that can be used to switch inputs remotely.
Example compatible hardware
- HKS0802A1U
- USB to RS232 Adapter (Any should work, but I use this one )
This uses --animate
which doesn't work with more than 3 frames when running in a docker container
spuder/openscad-dockerhub#2
openscad /dev/null -D '$vpt = [0,0,0];' -D '$vpd = 20; $vpr = [0,$t * 360,0];' -o 'foo.png' -D 'cube([2,3,4]);' --imgsize=250,250 --animate 360 --colorscheme "Tomorrow Night"
The following all work, but not very well
# A bash function that will create a new git repo and configure the user.email | |
# Usage: Add this to your ~/.bashrc or ~/.bash_profile or ~/.zshrc files | |
function f360 { | |
_basepath="${HOME}/Code/github/spuder" | |
if [[ -z "$1" ]]; then echo "Usage: f360 foobar"; return 1; fi | |
if [[ ! -d "${_basepath}" ]]; then echo "${_basepath} doesn't exist"; return 1; fi | |
if [[ -d "${_basepath}/$1" ]]; then echo "Directory ${_basepath}/${1} already exists"; return 1; fi | |
echo "Creating ${_basepath}/${1}" | |
mkdir $_basepath/$1 | |
cd $_basepath/$1 |
export ANIMAL=angry-purple-tiger #replace with your miner | |
hotspot=$(curl -s https://api.helium.io/v1/hotspots/name/${ANIMAL}) | |
# TODO: error if result != 1 | |
miner_height=$(echo $hotspot | jq -r '.data[].status.height') | |
chain_height=$(echo $hotspot | jq -r '.data[].block') | |
percentage=$(bc <<<"scale=6; $miner_height / $chain_height") | |
echo "=== ${ANIMAL} ===" | |
echo miner_height = ${miner_height} | |
echo chain_height = ${chain_height} | |
echo lag = $((${chain_height}-${miner_height})) |
#include <avr/sleep.h> | |
#define adc_disable() (ADCSRA &= ~(1<<ADEN)) // disable ADC (before power-off) | |
int buttonPin = 0; // phyisical pin 5 | |
int ledPin = 4; // physical pin 3 | |
void setup() { | |
// https://www.notion.so/spencerowen/AtTiny-85-automated-chicken-coop-heater-596304ab6b3145769b92ddffdeb16b6f | |
// https://arduino.stackexchange.com/a/66655/27311 |