Skip to content

Instantly share code, notes, and snippets.

View unixbigot's full-sized avatar

Christopher Biggs unixbigot

View GitHub Profile
@unixbigot
unixbigot / wemos_sled.gcode
Last active December 16, 2020 15:17
Design files for a breadboard sled to hold the WeMos D1 Mini IoT module. The .gcode file is suitable for use with bCNC. The .scad file is for OpenSCAD and can be exported to DXF or whatever your CNC needs.
(Block-name: block outline)
(Block-expand: 1)
(Block-enable: 0)
G0 X0 Y0 Z5
G1 Z0
g1 x60 y0
g1 x60 y40
g1 x0 y40
g1 x0 y0
g0 z5
@unixbigot
unixbigot / contact-lambda.js
Created April 25, 2017 00:58
Add an AWS-Lambda contact form to the "Agency" theme for Hugo (gohugo.io)
// Follow the instructions at https://www.codeengine.com/articles/process-form-aws-api-gateway-lambda/
// Including adding the custom javascript from that article (plus this file)
//
// In config.toml set postURL = "/rest/contact/"
// Support serialising the contact form as JSON to send to AWS Lambda
jQuery(document).ready(function ($) {
$('form[id=contactForm]').off('submit').on('submit', function (e) {
e.preventDefault();
var formJSON = $(this).formToJson({pretty: true, delimiter: '.'});
@unixbigot
unixbigot / wearable_parts.txt
Created January 23, 2018 22:42
IoTBNE + Accelerando Wearable Workshop Parts
Brains:
https://www.aliexpress.com/item/Free-Shipping-ATmega32U4-Board-LilyPad-for-Arduino-USB-Microcontroller-development-board/1992656809.html?spm=a2g0s.9042311.0.0.bMFysM
https://www.aliexpress.com/item/LilyPad-ATTINY85-digispark-Wearable-device-NANO-for-arduino/32655867610.html?spm=a2g0s.9042311.0.0.sG039Q
https://www.aliexpress.com/item/Free-Shipping-LilyPad-328-Main-Board-ATmega328P-ATmega328-16M-For-Arduino/32613856954.html?spm=2114.search0104.3.8.a59059ejOM6Vi&ws_ab_test=searchweb0_0,searchweb201602_5_5920015_10065_10344_10068_10130_10342_10547_10343_10340_10548_10341_10084_10617_10616_10083_10615_10307_10131_10132_10133_10313_10059_10534_100031_10604_10103_441_442_10142,searchweb201603_25,ppcSwitch_3&algo_expid=77a808c3-1553-4922-a1ca-23e3f383f2bd-1&algo_pvid=77a808c3-1553-4922-a1ca-23e3f383f2bd&priceBeautifyAB=2
https://www.aliexpress.com/item/MWC-MultiWii-Lite-SE-Flight-Control-Board-config-Uploader-MINIUSB-FTDI-Basic-USB-Frimware-PRGMR/1750493103.html?spm=a2g0s.9042311.0.0.bMFysM
Thread:
https:/
@unixbigot
unixbigot / loadcell.ino
Created July 6, 2019 01:39
basic LCD scale using load cell and hx711
//Sample using LiquidCrystal library
#include <LiquidCrystal.h>
/*******************************************************
This program will test the LCD panel and the buttons
Mark Bramwell, July 2010
********************************************************/
import time, datetime, calendar
from pytz import timezone
import requests, json
import RPi.GPIO as GPIO
Relay_Ch1 = 21
Relay_Ch2 = 26
Relay_Ch3 = 19
Relay_Ch4 = 13
AWS_PROFILE?=unixbigot
CLOUDFRONT?=EQ6KJ3VCZA0W1
test:
hugo server
build:
hugo
upload:
diff --git a/Code/Adafruit_FONA.cpp b/Code/Adafruit_FONA.cpp
index cc4cf53..cc7fc38 100644
--- a/Code/Adafruit_FONA.cpp
+++ b/Code/Adafruit_FONA.cpp
@@ -28,9 +28,9 @@ Adafruit_FONA::Adafruit_FONA(int8_t rst)
_rstpin = rst;
// apn = F("FONAnet");
- apn = F("");
- apnusername = 0;
@unixbigot
unixbigot / lsusb.pl
Created August 15, 2023 00:44
A script for MacOS that provides a brief summary of USB devices similar to Linux lsusb
#!/usr/bin/perl
#
# This script for MacOS gives a nice succinct list of all the devices on
# the USB bus, similar to the output of the Linux "lsusb" program.
#
use strict;
use warnings;
use v5.30;
use JSON;