Last active
February 29, 2020 17:20
-
-
Save dmiddlecamp/fbfd00420a2b5e536d839c7c01aee88a to your computer and use it in GitHub Desktop.
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
bool state = false; | |
void setup() { | |
pinMode(D7, OUTPUT); | |
Particle.keepAlive(1.5 * 60); | |
//Serial1.begin(9600); // crashes, uncomment to run normally. | |
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment