This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #define USING_SERIAL2 // Uncomment if you need to use Serial2 | |
#ifdef USING_SERIAL2 | |
#include "Serial2/Serial2.h" // Only needed if you use Serial2 | |
void serialEvent2(){ | |
Serial.print("Data is available on serial2"); | |
Serial2.read(); | |
} | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "elapsedMillis/elapsedMillis.h" | |
elapsedMillis timeElapsed; | |
unsigned char readSoilStateMachine = 0; | |
int rd = 0; // Global soil moisture value | |
void loop() | |
{ | |
readSoil(); // Run this as often as possible (it's non-blocking) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TCPClient client; | |
bool over = false; | |
void setup() | |
{ | |
// Make sure your Serial Terminal app is closed before powering your device | |
Serial.begin(9600); | |
// Now open your Serial Terminal, and hit any key to continue! | |
while(!Serial.available()) SPARK_WLAN_Loop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "InternetButton/InternetButton.h" | |
#include "math.h" | |
// Set up lots of global variables that we'll be using | |
InternetButton b = InternetButton(); | |
uint8_t button1 = 0; | |
uint8_t button2 = 0; | |
uint8_t button3 = 0; | |
uint8_t button4 = 0; | |
uint8_t buttonAll = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* @project phpSpark | |
* @file phpSpark.class.php | |
* @authors Harrison Jones ([email protected]) | |
* Devin Pearson ([email protected]) | |
* @date March 12, 2015 | |
* @brief PHP Class for interacting with the Spark Cloud (spark.io) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Particle TMP36 Example | |
// Author: [email protected] | |
// Description: Reads a TMP36 temperature in a loop and exposes it as a Cloud variable and sends it out via serial | |
// Connection: Connect VS to 3.3v, GND to GND, VOUT to A0. See http://www.analog.com/media/en/technical-documentation/data-sheets/TMP35_36_37.pdf for pin information | |
// | |
/* How it works: | |
The TMP36 outputs a voltage proportional ot the current temperature. | |
The resolution is 10 mv / degree centigrade (100 degrees centigrade / volt). There is a 500 mV offset (.5v) so negative temperatures can be measured | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am harrisonhjones on github. | |
* I am harrisonhjones (https://keybase.io/harrisonhjones) on keybase. | |
* I have a public key whose fingerprint is 44A3 EA71 BECE C315 077F 3525 1EF7 42AB E0ED 275D | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint node: true */ | |
"use strict"; | |
// Setup the modules we need to use | |
var spark = require('spark'); | |
var fs = require('fs'); | |
// Login and start doing things! | |
spark.on('login', function() { | |
//Get test event for specific core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Project: Door Controller | |
// Description: A simple Pebble app for controlling my Particle-powered door lock | |
// Author: Harrison Jones ([email protected]) | |
// Date: 6/7/2015 | |
// -------- Includes -------- /// | |
var UI = require('ui'); | |
var ajax = require('ajax'); | |
//var Vector2 = require('vector2'); | |
//var Accel = require('ui/accel'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------- // | |
// Documentation | |
// ------------------ | |
// -------------------------------------------- // | |
// Compiler Defines | |
// ------------------ | |
#define APP_VERSION 1.2 // Keep track of what version this code is | |
#define NUM_MEASUREMENTS 20 // The number of measurements we want to take befoe averaging and publishing |