Skip to content

Instantly share code, notes, and snippets.

#include <JeeLib.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <RTClib.h>
#include <RTC_DS3231.h>
ISR(WDT_vect) { Sleepy::watchdogEvent(); }
int debug=0;
#include <JeeLib.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <RTClib.h>
#include <RTC_DS3231.h>
ISR(WDT_vect) { Sleepy::watchdogEvent(); }
int debug=0;
@dwblair
dwblair / riffleREVC-CT.ino
Last active August 29, 2015 14:04
Code for measuring conductivity, temp, and light levels using Riffle REVC hardware
#include <JeeLib.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <RTClib.h>
#include <RTC_DS3231.h>
#include<stdlib.h>
#define led 6 //indicator led
#define photocellPin A2
@dwblair
dwblair / test1
Created August 18, 2014 22:20
Welcome document
Welcome to StackEdit! {#welcome}
====================
Hello, I am your first Markdown document within **StackEdit**[^stackedit]. Don't delete me, I can be helpful. I can be recovered anyway in the `Utils` tab of the <i class="icon-cog"></i> `Settings` dialog.
----------
Documents
@dwblair
dwblair / config
Created December 31, 2014 11:44
i3 config file, to be placed in .i3/config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@dwblair
dwblair / phant_post.py
Created January 4, 2015 21:14
posting to sparkfun's phant service
import urllib2
from random import randint
import time
publicKey='9JyZ00pQg7iDyOYaWDrv'
privateKey='xz4y55b8R1tbm5owZb47'
while 1:
r = randint(1,10)/10.
long pulseCount = 0; //a pulse counter variable
unsigned long pulseTime,lastTime, duration, totalDuration;
int samplingPeriod=2; // the number of seconds to measure 555 oscillations
int fivefivefive = 13; // the pin that powers the 555 subcircuit
void setup()
{
long pulseCount = 0; //a pulse counter variable
unsigned long pulseTime,lastTime, duration, totalDuration;
int samplingPeriod=1; // the number of seconds to measure 555 oscillations
int avenum=1; // number of samples to average
//int fivefivefive = 13; // the pin that powers the 555 subcircuit
void setup()
long pulseCount = 0; //a pulse counter variable
unsigned long pulseTime,lastTime, duration, totalDuration;
int samplingPeriod=1; // the number of seconds to measure 555 oscillations
int avenum=1; // number of samples to average
//int fivefivefive = 13; // the pin that powers the 555 subcircuit
void setup()
@dwblair
dwblair / autorun.sh
Last active August 29, 2015 14:21
With lots of help from Dogi -- temp1 pirateship phant test
#!/bin/sh
# configure pirateship image
sudo pirateship rename temper
sudo pirateship adapter pirate.sh/ip "" none
sudo ifdown wlan0
sudo ifup wlan0
# install opk drivers