Skip to content

Instantly share code, notes, and snippets.

View dhhagan's full-sized avatar
🙀
Building @quant-aq

David H Hagan dhhagan

🙀
Building @quant-aq
View GitHub Profile
@dhhagan
dhhagan / run-opc.py
Created June 16, 2015 20:36
Run Alphasense OPC-N2
'''
This is an example script displaying how to easily run the
Alphasense OPC-N2 from a Raspberry Pi using the py-opc library.
Author: David H Hagan
Email: david@davidhhagan.com
Date: 2015-06-16
'''
from opc import OPCN2
@dhhagan
dhhagan / bacharach.py
Created February 2, 2015 00:40
Log serial data from a Bacharach ECA450 Combustion Analyzer in real-time or post-collection.
'''
Written by David Hagan
January 8, 2015
This script reads data from the Bacharach ECA 450 Combustion analyzer through the serial interface and
logs the data to a file
In the future (If I ever use the Bacharach again), I aim to convert this into a GUI for ease of use.
Description of Columns:
@dhhagan
dhhagan / print-timestamp-arduino
Created January 6, 2015 21:27
Print a timestamp to SD card on Arduino
/*
print_time() returns a string in the format mm-dd-yyyy hh:mm:ss
*/
#include "RTClib.h"
#include <SD.h>
#include <SPI.h>
RTC_DS1307 rtc;
const int chipSelect = 10;