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
// 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
<?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
#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
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 "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
// #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
// IFTTT Google Drive Spreadsheet Update Example | |
// Use with https://ifttt.com/recipes/329485-update-a-spreadsheet-on-event use eventName "VOLTS" | |
// Author: Harrison Jones ([email protected]) | |
char message[180]; | |
void setup() {} | |
void loop() { | |
doublevolts = analogRead(A0) * 3.3 / 4096.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
git clone [email protected]:texane/stlink.git | |
cd stlink | |
./autogen.sh | |
./configure | |
make | |
make install |
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" | |
/*Did you know that the SparkButton can detect if it's moving? It's true! | |
Specifically it can read when it's being accelerated. Recall that gravity | |
is a constant acceleration and this becomes very useful- you know the orientation!*/ | |
InternetButton b = InternetButton(); |