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
void setup() { | |
Spark.function("nyan", nyanHandler); | |
} | |
void loop() { | |
//nothing to see here! | |
} | |
int nyanHandler(String cmd) { | |
if (cmd == "on") { |
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 PIN_MOTOR D0 | |
#define PIN_SOUND D4 | |
#define PIN_MOTION D2 | |
#define MAX_DANCE_TIME 2 * 60 * 1000 | |
unsigned int started_dancing = 0; | |
bool dancing = false, wasMotion = false; |
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
#ifndef Binary_h | |
#define Binary_h | |
#define B0 0 | |
#define B00 0 | |
#define B000 0 | |
#define B0000 0 | |
#define B00000 0 | |
#define B000000 0 | |
#define B0000000 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
//----------------------------------------------------------------- | |
// BMP085/BMP180 Barometric Pressure + Temp sensor for Spark Core | |
//================================================================= | |
// Copy this into a new application at: | |
// https://www.spark.io/build and go nuts! | |
//----------------------------------------------------------------- | |
// Technobly / BDub - Jan 2014 | |
//================================================================= | |
/*************************************************** |