Skip to content

Instantly share code, notes, and snippets.

View mbainrot's full-sized avatar

Max Bainrot mbainrot

  • Canberra, Australia
View GitHub Profile
@mbainrot
mbainrot / main.c
Last active April 16, 2018 08:09
How I got serial working on a PIC18F2550
/*
* File: main.c
* Author: max
*
* Created on April 14, 2018, 10:40 AM
*/
// Set the OSC to internal osc which is 8 MHz
#pragma config FOSC = INTOSC_EC
#pragma config WDT = OFF // turn off watch dog
@mbainrot
mbainrot / setalltrackwidth.py
Created December 7, 2020 08:53
kicad pcbnew python set all track width
board = pcbnew.GetBoard()
tracks = board.GetTracks()
targetWidth = 300000 # 300000 = 0.3 mm
for track in tracks:
track.SetWidth(targetWidth)
@mbainrot
mbainrot / knobby_midi.ino
Created October 15, 2022 09:50
Quick and dirty arduino sketch yields an 8 channel MIDI CC controller for cheap.
#include <MIDI.h>
#define STROBE 5
#define DATA 6
#define CLK 7
#define RTRN A0
#define MIDI_IN 2
#define MIDI_OUT 3
#define VCV_MODE 4