Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # License: GNU GPL v2.0
- String COMMAND_GET_ID = "get_id\n";
- String DEVICE_ID = "USB_TEST_1";
- String received;
- void setup() {
- Serial.begin(115200);
- Serial.setTimeout(100);
- }
- void loop() {
- received = Serial.readString();
- if (received == COMMAND_GET_ID) {
- Serial.println(DEVICE_ID);
- }
- }
Add Comment
Please, Sign In to add comment