Skip to content

Instantly share code, notes, and snippets.

@pwillard
pwillard / mqtt.yaml
Created May 16, 2024 15:02
My mqtt.yaml file
sensor:
- name: "lab temperature"
unique_id: "d2828a3e-1392-11ef-9262-0242ac120002"
state_topic: "homeassistant/lab/sensordata"
unit_of_measurement: '°F'
value_template: "{{ value_json.temperature }}"
- name: "lab humidity"
unique_id: "0ab62a0a-1393-11ef-9262-0242ac120002"
state_topic: "homeassistant/lab/sensordata"
unit_of_measurement: '%'
@pwillard
pwillard / gist:b782d871ced136b2d34bba424f73edf5
Created May 9, 2024 13:38
TM1637 TIME using TIMEAPI and MMBASIC on a PICOW
'==============================================================================
' TTTTT M M 1 666 3333 77777 BBBB AAA SSSS
' T MM MM 11 6 3 7 B B A A S
' T M M M 1 6666 333 7 BBBB AAAAA SSS
' T M M M 1 6 6 3 7 .. B B A A S
' T M M 111 666 3333 7 .. BBBB A A SSSS
'==============================================================================
' WIFI EDITION
'==============================================================================
' Program: Tm1637.Bas
@pwillard
pwillard / lwasm_make.ps1
Created February 12, 2024 13:25
A tool to compile Color Computer assembler code to a binary and create a DSK file for emulators to test it.
<#
############################################################################################
.SYNOPSIS
Compile 6809 Assmembler file with LWASM
.DESCRIPTION
This PowerShell script will assemble a Color Computer ASM file
.PARAMETER fileName
Specifies the file name to be assembled
.EXAMPLE
PS> ./lwasm_make.ps1 "$justName.asm"
@pwillard
pwillard / NAVS_OBJ_ImportFix.py
Last active January 9, 2024 18:13
Blender Python Fix for NAVS OBJ Import
import bpy
# Get selected objects
selected_objects = bpy.context.selected_objects
if selected_objects:
# Iterate through each selected object
for obj in selected_objects:
# Select the object
bpy.context.view_layer.objects.active = obj
@pwillard
pwillard / PortTracker.py
Created December 10, 2023 12:36
PySimpleGUI Serial Pprt Tracker
#-------------------------------------------------------------------------------
# Name:
# Purpose: Simple tracker for active serial ports attached to windows PC
#
# Author: Pete Willard
#
# Created: 15/08/2023
# Copyright: (c) willard 2023
# Licence: CC BY-NC-SA
#-------------------------------------------------------------------------------
@pwillard
pwillard / PicoWCLock.bas
Created March 25, 2023 13:08
PicoWClock.bas
'==============================================================================
' TTTTT M M 1 666 3333 77777 BBBB AAA SSSS
' T MM MM 11 6 3 7 B B A A S
' T M M M 1 6666 333 7 BBBB AAAAA SSS
' T M M M 1 6 6 3 7 .. B B A A S
' T M M 111 666 3333 7 .. BBBB A A SSSS
'==============================================================================
' WIFI EDITION
'==============================================================================
' Program: Tm1637.Bas
'Program: WAVESHARE-CLOCK.bas
'Author: Pete Willard
'Version: 0.10
'Target: picomite version
'Date: 2022/06/23
'Updated: 2022/09/06
'Time: 08:34 AM
'Notes: USING PIMORONI LIPO BOARD WITH WAVESHARE Pico-ResTouch-LCD-3.5
' and DS3231 I2C Real Time Clock (generic module)
' DATE format has support for USA style ;-P
@pwillard
pwillard / PicoClock.bas
Created July 15, 2022 13:53
Simple LED CLOCK using Raspberry Pi PICO
'==============================================================================
=
' TTTTT M M 1 666 3333 77777 BBBB AAA SSSS
' T MM MM 11 6 3 7 B B A A S
' T M M M 1 6666 333 7 BBBB AAAAA SSS
' T M M M 1 6 6 3 7 .. B B A A S
' T M M 111 666 3333 7 .. BBBB A A SSSS
'==============================================================================
=
@pwillard
pwillard / mstsexporter.py
Created January 4, 2022 15:27
This is a modification of the Blender MSTS/ORTS S file Exporter to allow you to choose between an ACE file or DDS file reference for all textures
bl_info = { "name": "Export OpenRails/MSTS Shape File(.s)",
"author": "Wayne Campbell",
"version": (4, 3),
"blender": (2, 80, 0),
"location": "File > Export > OpenRails/MSTS (.s)",
"description": "Export file to OpenRails/MSTS .S format",
"category": "Import-Export"}
'''
@pwillard
pwillard / BlendPersona.ps1
Last active November 30, 2022 13:10
Blender Persona Script
# Powershell 7
# Quick and Dirty tool to manage alternate Blender personas by
# swapping out Startup.blend files.
#
# The general idea is tha you have a config BACKUP folder where you keep a
# master copy of the general startup and your special startup files.
#
# For example... I have one Blend file that starts up without default cube and is setup
# for Millimeters... (for making 3d printing models) and it saves me the time of messing
# with UNITS and such.