I initially had a timer and state machine in the main loop, but this is way more efficient and has no effect on the user code once you are out of setup(). Serial.print("Spark Core or Photon says Hello over USB! ") while we are hanging around doing nothing.ĭigitalWrite(D7,LOW) // Turn off the D7 led. Spark.process() // in the Serial Terminal. While(!Serial.available()) // Wait here until the user presses ENTER Serial.begin(9600) // Open serial over USB. PinMode(D7,OUTPUT) // Turn on the D7 led so we know it's timeĭigitalWrite(D7,HIGH) // to open the Serial Terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |