Skip to content

Instantly share code, notes, and snippets.

View newsch's full-sized avatar

Evan Lloyd New-Schmidt newsch

View GitHub Profile

Keybase proof

I hereby claim:

  • I am newsch on github.
  • I am newsch (https://keybase.io/newsch) on keybase.
  • I have a public key whose fingerprint is 50B5 39B9 9C02 C0EE D84D F90E 0E2D 88DB 06B6 26F1

To claim this, I am signing this object:

@newsch
newsch / screen_controller.ino
Last active July 3, 2017 20:47
Da-Lite Low Voltage Screen Controller
/*
Da-Lite Low Voltage Screen Controller
Creates a pseudo lower limit for the screen based on potentiometer value
*/
// #define DEBUG
// pins
#ifdef DEBUG
#define UP_IN 4
@newsch
newsch / README.md
Created July 11, 2017 13:54
Playing around with an ABE identity

ABE logo

/*******************************************************************************
* Step 0) Add a clear descriptive title block at the top of your robot code
* Example Title block follows:
* Title: 2018 Fun-Robo Simple Arduino Robot Controller (ENGR3390 Tutorial 4)
* Description: This structure template contains a SENSE-THINK-ACT data flow to
* allow a Robot to perform a sequence of meta-behaviors in soft-real-time based on direct
* text commands from a human operator.
* Robot Name?: ***add name here** Example; TutorialBot 1
* What does code do?: ****give a short description of what code does*** Example; poll operator,
* carry out operator text input, loop indefinitely
@newsch
newsch / focsuml.py
Last active September 18, 2018 04:54
Convert an abacus-style computation diagram into a plantUML diagram
#!/usr/bin/env python3
"""Convert an abacus-style computation diagram into a plantUML diagram
https://regexr.com/3vj09
"""
import argparse
import re
import warnings
parser = argparse.ArgumentParser(description='Generate PlantUML activity diagrams from FoCS abacus-style diagram lists.')
@newsch
newsch / group_parser.py
Created September 19, 2018 02:52
Parse a csv of Olin student groups and output formatted text.
#!/usr/bin/env python3
import csv
with open('groups.csv', 'r') as csvfile:
reader = csv.DictReader(csvfile, ['full','acrnm','leader'])
names = [club['acrnm'] if club['acrnm'] != '' else club['full'] for club in reader]
[print(name) for name in names]
#!/usr/bin/env python3
"""Print a horizontal or vertical enumeration.
Need to figure out how many characters tall or wide something is in a pinch?
This is the commandline utility for you!
"""
import argparse
parser = argparse.ArgumentParser(
description='Print a horizontal or vertical enumeration.')
import serial
import time
DEVICE_PATH = '/dev/ttyACM0'
BAUD_RATE = 115200
s = serial.Serial(DEVICE_PATH, BAUD_RATE)
while True:
if s.in_waiting > 0: # when new serial info is waiting
$0=10 (Step pulse time, microseconds)
$1=25 (Step idle delay, milliseconds)
$2=0 (Step pulse invert, mask)
$3=0 (Step direction invert, mask)
$4=0 (Invert step enable pin, boolean)
$5=1 (Invert limit pins, boolean)
$6=0 (Invert probe pin, boolean)
$10=1 (Status report options, mask)
$11=0.010 (Junction deviation, millimeters)
$12=0.002 (Arc tolerance, millimeters)
#!/usr/bin/env python3
"""Format a csv-styled 9x9 sudoku board.
Usage: `sudoku -g -fcsv | ./receipt-sudoku.py - > receipt.txt
"""
from typing import List
SudokuBoard = List[List[int]]