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
#include "pumpstate.h" | |
SYSTEM_MODE(AUTOMATIC); | |
SYSTEM_THREAD(ENABLED); | |
void setup() { | |
Serial.begin(9600); | |
delay(1000); | |
initPumpState(); |
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
SYSTEM_MODE(SEMI_AUTOMATIC); | |
SYSTEM_THREAD(ENABLED); | |
#define UPDATE_IF_CHANGED(var, new_value, desc) {\ | |
if ((new_value) != (var)) {\ | |
(var) = (new_value);\ | |
Serial.print((desc));\ | |
Serial.print(": ");\ | |
Serial.println((var));\ | |
}\ |
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
SYSTEM_MODE(AUTOMATIC); | |
SYSTEM_THREAD(ENABLED); | |
void setup() { | |
Serial.begin(9600); | |
delay(1000); | |
Serial.println("Starting!"); | |
} |
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
SYSTEM_MODE(MANUAL); | |
SYSTEM_THREAD(ENABLED); | |
void setup() { | |
Serial.begin(9600); | |
delay(1000); | |
} | |
void manageConnection() { | |
if (!Particle.connected()) { |
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
SYSTEM_MODE(MANUAL); | |
SYSTEM_THREAD(ENABLED); | |
bool _connectingToCloud = false; | |
void setup() { | |
Serial.begin(9600); | |
delay(2000); | |
} |
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
# REQUIRES PYTHON 3 | |
# | |
# $ python3 packet_test.py 1 | |
# sending 1 packet | |
# {'r': -1024} | |
# $ python3 packet_test.py 2 | |
# sending 2 packets | |
# {'r': 0} | |
import socket |
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
SYSTEM_MODE(MANUAL); | |
SYSTEM_THREAD(ENABLED); | |
void setup() { | |
Serial.begin(9600); | |
delay(1000); | |
} | |
bool _connectingToCloud = false; | |
void manageConnection() { |
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
#include "application.h" | |
SYSTEM_MODE(SEMI_AUTOMATIC); | |
SYSTEM_THREAD(ENABLED); | |
//Settings | |
String DeviceID = System.deviceID(); | |
retained uint32_t value = 0; | |
int retry_count = 0; |
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
SYSTEM_MODE(MANUAL); | |
SYSTEM_THREAD(ENABLED); | |
void setup() { | |
Serial.begin(9600); | |
delay(1000); | |
} | |
void loop() { |
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
SYSTEM_MODE(MANUAL); | |
SYSTEM_THREAD(ENABLED); | |
#define UPDATE_IF_CHANGED(var, new_value, desc) {\ | |
if ((new_value) != (var)) {\ | |
(var) = (new_value);\ | |
Serial.print((desc));\ | |
Serial.print(": ");\ | |
Serial.println((var));\ | |
}\ |
NewerOlder