webusb / arduino

WebUSB demos running on Arduino (and compatible) hardware.
566 stars 152 forks source link

Officially support using the WebUSB versions of board definitions #32

Open jpliew opened 7 years ago

jpliew commented 7 years ago

The WebUSB library provides all the extra low-level USB code necessary for WebUSB support except for one thing: Your device must be upgraded from USB 2.0 to USB 2.1. To do this go into the SDK installation directory and open hardware/arduino/avr/cores/arduino/USBCore.h. Then find the line #define v. That's it!

This change is not needed because the file webusb\avr\boards.txt in this repo has already defined the correct USB_VERSION.

Just need to add a missing instruction in README.md to copy the folder webusb to arduino\hardware folder.

q2dg commented 6 years ago

Maybe adding a new "WebUsb Board" into official Arduino Boards Manager could do this trick automatically?

PS: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification

jpliew commented 6 years ago

@q2dg when the webusb folder from this repo is being copied to Arduino's hardware folder, the IDE will have WebUSB shown in the tools-->board section

image

Editing the original USBCore.h will interfere with other boards that are relying on the original code.

jpliew commented 6 years ago

Hi @reillyeon I wonder why you change the title of this issue to "Officially support using the WebUSB versions of board definitions"?

Officially, this library WebUSB, already support board definitions.

There is just a missing instruction to copy the files over to Arduino and does not require editing of the USBcore.h file.

So, this issue is to correct the README.md. If you are happy I can do a pull request to change the wording.

reillyeon commented 6 years ago

The necessary action on this issue is to verify that the updated board definitions correctly set USB_VERSION for all the boards listed as tested, and then update README.md.