Skip to content

Instantly share code, notes, and snippets.

View christakahashi's full-sized avatar

Chris Takahashi christakahashi

  • University of Washington, @uwmisl
  • Seattle, WA
View GitHub Profile
//A SUPER SIMPLE soft UART TX for any AVR(ATmega/AT90/ATtiny).
// Tested on an ATmega16M1 @ 8mhz.
// 46 bytes of code space.
// 57600 baud at F_OSC 8mhz
// The baud rate will scale with CPU frequency so be careful.
//
// For basic debug only.
// No guarentee this will work.
//
// By: Chris Takahashi 2020
@christakahashi
christakahashi / RCPsplit.py
Last active August 29, 2015 14:22
Splits racecapture pro logs into driver stints based an battery voltage and speed. Assumes car is off between stints (therefor no alternator is running). Usage: python RCPsplit.py <filename>
#Copyright (c) 2015, Chris Takahashi
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
#
#1. Redistributions of source code must retain the above copyright notice, this
#list of conditions and the following disclaimer.
#
#2. Redistributions in binary form must reproduce the above copyright notice,
@christakahashi
christakahashi / contract_pads.py
Last active September 28, 2016 03:51
Contracts the pads (and all geometry) in a gerber files. Used for making laser cut solder stencils from the cream layer.
#!/usr/bin/env python
##############
#Usage: python contract_pads.py gerber_file_name
#contracts pads by 10mil (see constand below to change)
#assumes units are in inches and fixed point 2.4 format is used
#requires numpy and shapely (http://toblerity.org/shapely)
#for windows use the installer on the shapely website instead of pip or you'll
#be missing a dll
##############
@christakahashi
christakahashi / plot.py
Last active August 29, 2015 14:04
Example Flexostat plotting code.
#!/usr/bin/env python
#Above line will ensure python is envoked on mac/linux
import json
#if we're running in canopy then everything is already imported AND we're in
# interactive mode for matplotlib (meaning you don't need the show() command).
try:
np
no_show = True