Skip to content

Instantly share code, notes, and snippets.

Cody Lewis srlm-io

View GitHub Profile
from __future__ import print_function
import serial
# This script is intended to redirect a specially demarcated section
# of the serial stream to STDERR, which you can then redirect to
# wherever you wish (like a text file for importing into Excel).
# host usage:
# python 2> mydata.txt
srlm-io / main.js
Created Nov 22, 2014
Hapi.js and Lab asynchronous server testing
View main.js
"use strict";
var Hapi = require('hapi');
var Joi = require('joi');
var database = require('./database');
exports.init = function (startListening, doneCallback) {
var server = Hapi.createServer(nconf.get('listenIp'), nconf.get('port'), {
cors: {
origin: [
srlm-io / eCompass.ino
Last active Oct 3, 2017
LSM303DLHC eCompass implementation
View eCompass.ino
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_LSM303_U.h>
#include <orientation.h>
// For the fabs function in fixedWidthPrint
#include <Math.h>
/* Assign a unique ID to this sensor at the same time */
Adafruit_LSM303_Accel_Unified accl = Adafruit_LSM303_Accel_Unified(54321);
You can’t perform that action at this time.