webusb / arduino

WebUSB demos running on Arduino (and compatible) hardware.
580 stars 154 forks source link

how set baudrate? what default speed? #102

Open selevo opened 1 year ago

selevo commented 1 year ago

i not see it in code (( thank's

jpliew commented 1 year ago

The baud rate is set here

https://github.com/webusb/arduino/blob/486b7e8274b8e39440d6c63719a31273fec60adb/demos/rgb/sketch/sketch.ino#L25

The redefinition of the WebUSB to Serial here

https://github.com/webusb/arduino/blob/486b7e8274b8e39440d6c63719a31273fec60adb/demos/rgb/sketch/sketch.ino#L13C16-L13C28

is confusing that may be misunderstood as a regular Serial. Should have just let it be 'WebUSBSerial' instead.

reillyeon commented 1 year ago

Baud rate essentially does not matter for an emulated USB serial port like is created here, which is why there's nothing on the host side to set baud rate.

Now that the Web Serial API is available it is mostly unnecessary to use this library to create a custom USB endpoint for WebUSB.

selevo commented 1 year ago

Thank's!

About API Web Serial .... It's not work on android brousers but webusb - work https://selevo.github.io/WebUsbSerialTerminal/

This allows you to use a smartphone as a display, mathematical apparatus and visualization tool for any devices that require a display, and the user can save on this and in DIY developers can also use this option to save money. besides, most people have at least two smartphones collecting dust in their desk drawer 😀

I don’t understand well why speed is not important, where can I read more about this? After all, usually when the speed of the receiver and transmitter differ, I get Abracadabra instead of symbols