Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Spec out the protocol for WebUSB communication #23

Open
justinmoon opened this issue Aug 28, 2018 · 1 comment
Open

Spec out the protocol for WebUSB communication #23

justinmoon opened this issue Aug 28, 2018 · 1 comment

Comments

@justinmoon
Copy link
Contributor

justinmoon commented Aug 28, 2018

The port object I'm currently getting from arduino-webusb has a .send() method that will send a string over the WebUSB connection to the device. But this .send() doesn't provide the actual response from the Arduino.

In #21 I prototyped a protocol where the Arduino would send a comma-delimited command,payload message to the UI, which the UI would listen for and handle.

This works but it doesn't seem optimal to me. It will become complicated to keep track of loading states. And it's ugly.

Hopefully we can find a better way ...

@justinmoon justinmoon changed the title Spec out the protocol for serial communication Spec out the protocol for WebUSB communication Aug 28, 2018
@justinmoon
Copy link
Contributor Author

Stepan was saying how it would probably be better to send bytes instead of strings.

Something like Serial.write(arr, sizeof(arr)); where arr is our message: an array of bytes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant