Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //send
- byte data[2];
- data[0] = volume_json;
- data[1] = relay_json;
- Serial.write(data, 2 );
- //read
- byte incomingBytes[2];
- if (Serial.available()) { // If anything comes in Serial (USB),
- for (int i = 0; i < 3; i++) {
- incomingBytes[i] = Serial.read();
- }
- Serial.println(incomingBytes[0]);
- Serial.println(incomingBytes[1]);
- }
Add Comment
Please, Sign In to add comment