This file contains 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
var five = require("johnny-five"); | |
var Spark = require("spark-io"); | |
var board = new five.Board({ | |
io: new Spark({ | |
token: process.env.SPARK_TOKEN, | |
deviceId: process.env.SPARK_DEVICE_ID | |
}) | |
}); |
This file contains 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
// ThingSpeak Settings | |
char thingSpeakAddress[] = "api.thingspeak.com"; | |
String writeAPIKey = "THINGSPEAK_WRITE_KEY"; | |
const unsigned int updateThingSpeakInterval = 30000; | |
// Variable Setup | |
unsigned long lastConnectionTime = 0; | |
// Initialize TCP Client | |
TCPClient client; |
This file contains 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
// ThingSpeak Settings | |
char thingSpeakAddress[] = "api.thingspeak.com"; | |
String writeAPIKey = "THINGSPEAK_WRITE_API"; | |
const unsigned int updateThingSpeakInterval = 30000; | |
unsigned long lastConnectionTime = 0; | |
bool lastConnected = false; | |
int failedCounter = 0; | |
TCPClient client; |
NewerOlder