Skip to content

Instantly share code, notes, and snippets.

View darconeous's full-sized avatar
🦀

Robert Quattlebaum darconeous

🦀
View GitHub Profile
@darconeous
darconeous / _README.md
Created September 23, 2024 23:45
fatal error: avr/iom1608.h: No such file or directory
/opt/homebrew/Cellar/avr-gcc@12/12.2.0_3/avr/include/avr/io.h:577:33: fatal error: avr/iom1608.h: No such file or directory
/opt/homebrew/Cellar/avr-gcc@12/12.2.0_3/avr/include/avr/io.h:577:33: fatal error: avr/iom808.h: No such file or directory

If you ended up here, I think you likely got an error like what is pictured above. For some reason your avr-gcc library doesn't include the header files for the ATTiny1608 or ATTiny808 processors. But the good news is you can just download a few files (like from here) drop them in the right place and then everything will work.

@darconeous
darconeous / gecoloreffects.py
Last active October 25, 2023 19:34
PIO-based GE-ColorEffects G35 driver for MicroPython on RP2
# PIO-based GE-ColorEffects driver for MicroPython on RP2
# MIT license; Copyright (c) 2023 Robert Quattlebaum
import array, time
from machine import Pin
import rp2
import machine
# Pin 15 is the default on the [pimoroni plasma stick][1].
#
@darconeous
darconeous / self-signed-cert.conf
Last active August 9, 2023 20:34
OpenSSL self-signed certificate config
# Use like:
#
# ```
# openssl req -x509 -nodes \
# -days 3650 \
# -newkey rsa:2048 \
# -keyout /etc/ssl/private/host.key.pem \
# -out /etc/ssl/certs/host.crt.pem \
# -config self-signed-cert.cfg
# ```
@darconeous
darconeous / gist:c87cb13e35d92f442de6c5d8603698cf
Created May 10, 2023 19:54
converting tab-delimited to pipe-delimited
pbpaste | tr '\t' '|' | sed 's/\(.*\)/|\1|/' | pbcopy
@darconeous
darconeous / 3d-printing-trimmer-line.md
Last active May 28, 2024 17:28
3D Printing with Nylon Trimmer Line

3D Printing with Nylon Trimmer Line

Disclaimer

All of this information is provided AS IS, with no warranty or guarantee of accuracy. A good-faith effort has been made to ensure this document was accurate at the time it was written, but YOU ASSUME ALL RISK BY FOLLOWING ANY ADVICE BELOW.

Introduction

Nylon is a strong and impact-resistant thermoplastic that is used

@darconeous
darconeous / chamfer.scad
Last active December 14, 2022 21:57
Chamfering OpenSCAD Example
/// Chamfering OpenSCAD Example
/// Written by Robert Quattlebaum, 2022-12-14
///
/// This example shows a method for adding a chamfer to a certain
/// class of 3D objects where the profile in the Z dimension doesn't
/// change significantly.
///
/// You must specify the size of the chamfer, the height of the child
/// and the Z-offset for the bottom of the object. You can also specify
/// the shape of the chamfer, which can be either "cone", "curve", "curve-in",
@darconeous
darconeous / tcprepl.py
Created September 21, 2022 00:23
Micropython TCP/telnet REPL
# REPL Prompt over TCP socket.
# Use `$ telnet <ip-addr>` to connect.
import network
import os
import socket
import sys
listen_s = None
client_s = None
@darconeous
darconeous / fm-discriminator.md
Last active April 20, 2023 20:34
Extracting the fundamental frequency from a time-domain signal

Extracting the fundamental frequency from a time-domain signal

"Extracting the fundamental frequency from a time-domain signal" is basically a long-winded way of saying "demodulating the baseband signal from FM-encoded signal". Well, that's still long winded, but I digress.

In an FM radio, the contraption that accomplishes this task is referred to as a "discriminator". So the task here is to implement a software-based frequency discriminator. There are a few different ways

@darconeous
darconeous / rect-starlink-cable-hack.md
Last active December 7, 2024 17:45
Hacking the Rectangular Starlink Dishy Cable
@darconeous
darconeous / quick_install.sh
Created March 17, 2020 21:46
Installer script for ledger-u2f-javacard
#!/bin/sh
GP=${GP-java -jar gp.jar}
set -v
set -e
# This is for the ACR122U to put it into
# a nice state where it won't time out on us.
$GP -d -v -a ff0041ff00 -a ff00520000 || true