Closed beaufortfrancois closed 8 years ago
The #define is nice in the sense that removing it makes it possible to test the code using the standard arduino serial connection. So you can make sure that everything works fine before moving to WebUSB.
I am fine with changing the name though
I would rather rename WebUSB -> WebUSBSerial and keep the #define Serial WebUSBSerial as I agree with @kenchris's point about testing.
I've updated this PR and kept the #define Serial WebUSBSerial
.
One quick observation though, why do we specify baud
in Serial.begin
if WebUSBSerial doesn't use it: https://github.com/webusb/arduino/blob/25e33acb0345fffa610c07aa20c898e2a3861859/library/WebUSB/WebUSB.cpp#L227
Because the Arduino Serial object requires it - again for testing purposes
:+1:
I'd like to rename
WebSerial
toWebUSBSerial
for two reasons:#define Serial WebSerial
which can be misleading for new comers.Yeah. I'm not that good at counting...
R=@reillyeon