Skip to content

Instantly share code, notes, and snippets.

View srlm-io's full-sized avatar
💭
Also contributed to Red9 and libpropeller. See the Organizations in my profile

Cody Lewis srlm-io

💭
Also contributed to Red9 and libpropeller. See the Organizations in my profile
View GitHub Profile
@srlm-io
srlm-io / eCompass.ino
Last active October 3, 2017 14:57
LSM303DLHC eCompass implementation
#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);
@srlm-io
srlm-io / main.js
Created November 22, 2014 05:06
Hapi.js and Lab asynchronous server testing
"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: [
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 serial_split.py 2> mydata.txt