Is there a way to edit boards.txt?

Is there a way to edit the boards.txt file when using the web editor?

I've built a joystick and am using Joystick.h for controlling it.
It works great, but when I try to use two joysticks (each with it's own arduino board) on the same computer, they show up in my USB Game Controllers (Win10) as the same device.

This video shows a workaround, but it makes changes to the boards.txt file and I don't know how to accomplish that with the web editor.

Is there a way to do this?
(Or a better solution?)
Thanks

Hi @jimrooney

No. Although you have access to the source code of your sketches and libraries, there is no way to modify the boards platforms installed on the Arduino Web Editor server.

You will need to use Arduino IDE on your computer if modifications to boards.txt is necessary.

For the benefit of other interested parties, I'll provide a link to the specific section of the video:

https://youtu.be/YAbi_AqF7aQ?t=562

The change made in the video is changing the value of global macros defined via -D flags passed to the compiler:

Those macros are then used in the core's USB HID code. There is no way for the user to define arbitrary global macros in Arduino Web Editor

Try selecting "Arduino Leonardo" from the board selector when compiling the sketch for one of the boards, and "Arduino Micro" when compiling the sketch for the other board.

You can choose any board you like by selecting "Select Other Board & Port" from the menu, then selecting the board and port from the dialog that opens.

The two board definitions are the same, but they give different identifiers to the boards. That should be equivalent to the change made in the video.

Fantastic.
That seems to work just fine.

Getting greedy.... is there a way to play this trick again for a third board (and beyond)?
Not sure how many controllers I'll make, but just wondering where the limits might be.

Thanks

Fortunately, Arduino churned out quite a few products based on the ATmega32U4, each with unique identifications, but with boards definitions which should be equivalent for this purpose:

  • Arduino Leonardo ETH
  • Arduino Esplora
  • Arduino Robot Control
  • Arduino Robot Motor
  • Arduino Yún
  • Arduino Yún Mini
  • Arduino Industrial 101
  • Linino One

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.