Skip to content

Instantly share code, notes, and snippets.

View griv's full-sized avatar

Steve Berrick griv

View GitHub Profile
@griv
griv / test_phototransistor.ino
Created March 11, 2018 06:33
Test phototransistor
// phototransistor test
int pt = A0;
int led = 11;
int val = 0;
void setup() {
// analog in
pinMode(pt, INPUT);
@griv
griv / ESP8266_OSC_Serial_Bridge.ino
Last active March 2, 2018 08:55
ESP8266 OSC -> Serial Bridge
/*
ESP8266 Bridge OSC -> Serial
Receives OSC (Port 8888), and passes it through to Serial
Have been using this with Teensy 3.2 (Serial 1)
*/
@griv
griv / SerialReflector.ino
Created February 25, 2018 08:34
Use Teensy to program ESP8266
/**
SerialReflector
*/
void setup() {
Serial.begin(115200); // Serial port for connection to host
Serial1.begin(115200); // Serial port for connection to serial device
}
void loop() {
if (Serial1.available()) {
/*
* arts action! by pvi collective
*
* adds content to end of <body> to cover site as a protest to arts funding cuts to independent artists.
* checks local time and only shows on national day of action, june 17th 2016
*
* author: steve berrick <mrberrick@pvicollective.com>
*
*/
@griv
griv / Dbg.cs
Created April 29, 2015 06:42
Simple log to file for Unity3D apps. Designed for long running standalone application, logs a file per run in year / month folders.
using UnityEngine;
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
// Taken from here: http://www.thegameengineer.com/blog/2014/02/09/unity-11-logging/
// and adapted to my needs - per run log files, in year / month folders
// Steve Berrick <steve@berrick.net>
@griv
griv / keybase.md
Created April 23, 2015 06:16
keybase.md

Keybase proof

I hereby claim:

  • I am griv on github.
  • I am grivvr (https://keybase.io/grivvr) on keybase.
  • I have a public key whose fingerprint is 64F0 BE71 D18A 7E0C FFDA 9883 1FA9 BC59 0784 8CF5

To claim this, I am signing this object:

@griv
griv / SaveFrames.cs
Last active August 29, 2015 14:17
Renders Unity Camera.main to png images.
using UnityEngine;
using System.Collections;
using System;
public class SaveFrames : MonoBehaviour {
public bool saveFrames = false;
public bool saveFrameHotKey = false;