Last active
February 29, 2020 17:20
-
-
Save dmiddlecamp/fbfd00420a2b5e536d839c7c01aee88a to your computer and use it in GitHub Desktop.
Revisions
-
dmiddlecamp revised this gist
Apr 5, 2018 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,7 @@ void setup() { pinMode(D7, OUTPUT); Particle.keepAlive(1.5 * 60); //Serial1.begin(9600); // crashes, uncomment to run normally. Particle.function("test", doTest); Particle.connect(); -
dmiddlecamp created this gist
Apr 5, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ bool state = false; void setup() { pinMode(D7, OUTPUT); Particle.keepAlive(1.5 * 60); //Serial1.begin(9600); // doesn't crash //Serial1.begin(9600); // crashes Particle.function("test", doTest); Particle.connect(); } void loop() { digitalWrite(D7, (state) ? HIGH : LOW); state = !state; Serial1.println("anything"); delay(1000); } int doTest(String command) { digitalWrite(D7, (state) ? HIGH : LOW); state = !state; delay(250); digitalWrite(D7, (state) ? HIGH : LOW); state = !state; delay(250); }