Created
April 19, 2017 03:47
-
-
Save sidwarkd/d10d1164c47fb9d79c146266c0a500d2 to your computer and use it in GitHub Desktop.
USBSerial1 Example
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
void setup() { | |
delay(5000); // Give yourself 5 seconds to launch particle serial monitor | |
Serial.begin(); | |
USBSerial1.begin(); | |
Serial.println("Serial port configured!"); | |
USBSerial1.println("USBSerial1 configured too!"); | |
pinMode(D7, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(D7, HIGH); | |
Serial.println("LED on"); | |
delay(1000); | |
digitalWrite(D7, LOW); | |
Serial.println("LED off"); | |
delay(1000); | |
USBSerial1.println("Some other random sensor data"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment