Skip to content

Instantly share code, notes, and snippets.

@sidwarkd
Created April 19, 2017 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidwarkd/d10d1164c47fb9d79c146266c0a500d2 to your computer and use it in GitHub Desktop.
Save sidwarkd/d10d1164c47fb9d79c146266c0a500d2 to your computer and use it in GitHub Desktop.
USBSerial1 Example
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