How to edit library file online?

Hi

I am trying out the USB Host library found in the library manager in Arduino online / web interface.

I need to set a #define to 1 in a library file, settings.h, in order for debug to get activated.

How do I find and edit settings.h, or any library file for that matter, in the online interface?

Thanks

You can't do that currently using the online interface. What you can do is to download the library, edit it on your computer, and then import it back to Arduino Web Editor:

  • From the bar on the left side of the screen, click the "Libraries" tab.
  • Find the library you want to download.
  • Hover the mouse pointer over the library. You should see a downward pointing triangle button appear.
  • Click the downward pointing triangle button.
  • Click "Download Library".
  • Wait for the download to finish.
  • Unzip the downloaded file.
  • Make the edits.
  • Zip the library back up.
  • In the Arduino Web Editor, click the upwards pointing arrow button (Import).
  • If you get a message about importing your sketchbook, click the "Import" button.
  • Select the .zip file you made of the modified library.
  • Click the "Open" button.
  • Wait for the notification that the library was successfully imported.

Ok, thanks for the info!

Pretty useless with the online tool then, if you need this 14 step procedure just to change a 0 to a 1 in a .h-file.

What where they thinking? :wink:

You're welcome. I'm glad if I was able to be of assistance.

To be fair, the standard IDE doesn't allow you to edit libraries either. That's less of an inconvenience because the library is installed on your computer so it's more simple to just open up the file in a text editor. There are very few Arduino libraries that require you to edit their files for configuration so I think most users won't mind not being able to edit libraries. Regarding the 14 steps, I tend to make my instructions very detailed so that they are usable by everyone, regardless of their level of experience. I'm sure my instructions for editing a library when using the regular Arduino IDE would have been around 10 steps.

I know the ability to edit libraries has been requested on the Arduino Web Editor "wish list" thread, so the Arduino developers are definitely aware this is something the users want. Maybe you'll see it added as an "advanced feature" in the near future.

Hi @Thomasx,
we are happy to announce that library editing is now available on Create Web Editor with the Maker Plan. Thanks for your feedback!