Skip to content

Instantly share code, notes, and snippets.

View bmidgley's full-sized avatar

Brad Midgley bmidgley

  • Utah
  • 07:26 (UTC -06:00)
View GitHub Profile
@bmidgley
bmidgley / evalink.mmd
Last active March 10, 2025 13:17
evalink 2025 diagram
@bmidgley
bmidgley / pgen.py
Created October 30, 2024 23:53
python password gen
import secrets
password_length = 13
print(secrets.token_urlsafe(password_length))
@bmidgley
bmidgley / evalink.mmd
Last active June 20, 2024 00:28
evalink picture
@bmidgley
bmidgley / bot.py
Last active March 26, 2024 22:26
festival bot, driving app for microbit, using continuous servos connected to pin1 and pin2. Same code on transmitter and receiver.
radio.onReceivedValue(function (name, value) {
if (name == "roll") {
roll = value / 50
} else if (name == "pitch") {
pitch = (0 - value) / 50
} else if (name == "shake" ) {
pins.servoWritePin(AnalogPin.P1, 90)
pins.servoWritePin(AnalogPin.P2, 90)
basic.showLeds(`
# . . . #
@bmidgley
bmidgley / driver.py
Created February 5, 2024 21:07
display pi camera video on oled
#!/usr/bin/env python3
import cv2
import io
import time
import picamera
import Adafruit_SSD1306
import numpy as np
from Adafruit_GPIO import SPI
from PIL import Image
@bmidgley
bmidgley / remoteid-bt5-scan.ino
Last active January 15, 2024 19:17
Scan and parse remoteid bt5 broadcasts
/*
Print and log csv-style lines with altitude in meters
id,lat,long,altitude,isotime
0DFFFAABB,41.118233,-112.045356,1632.5,2024-01-13T06:25:21Z
*/
#ifndef SOC_BLE_50_SUPPORTED
#warning "This SoC does not support BLE5. Try using ESP32-C3, or ESP32-S3"
#else
#include "FS.h"
root@serial:~# cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
@bmidgley
bmidgley / analogs.mmd
Last active August 20, 2023 21:40
Joining multiple analogs together
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bmidgley
bmidgley / code.mmd
Last active September 24, 2024 03:46
MDRS mesh data flows
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.