Guest User

Untitled

a guest
Jan 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # License: GNU GPL v2.0
  2. String COMMAND_GET_ID = "get_id\n";
  3. String DEVICE_ID = "USB_TEST_1";
  4.  
  5. String received;
  6.  
  7. void setup() {
  8. Serial.begin(115200);
  9. Serial.setTimeout(100);
  10. }
  11.  
  12. void loop() {
  13. received = Serial.readString();
  14. if (received == COMMAND_GET_ID) {
  15. Serial.println(DEVICE_ID);
  16. }
  17. }
Add Comment
Please, Sign In to add comment