Limited library access using Web editor

I've noticed when comparing library access using my desktop connection to Arduino and then using the web editor, the web edition doesn't provide me with access to SR04.h ....needed for a ultra sonic component boxed with the super starter kit. Is the the web editor intended for some other use? any advice gratefully received

Hi @connelsey. Unlike the desktop Arduino IDE, the Arduino Web Editor has every one of the ~4000 libraries of the Arduino Library Manager pre-installed. So it actually has immensely more "library access" out of the box.

However, not all Arduino libraries are in the Library Manager. That is likely the case with the library that provides the SR04.h file on your desktop. In this case, you will need to install the library, just like you needed to install the library to use it on your desktop.

In Arduino Web Editor, installing additional libraries can be done by following these instructions:

  1. Download the .zip of the library you want to install, or zip the library from your computer if that's more convenient.
  2. Select "Libraries" from the menu on the left side bar of the web page.
  3. In the libraries pane that opened, click the upward pointing arrow button ("Import").
  4. If you get a dialog about importing your sketchbook, click the IMPORT button (though you might like to consider the option of importing your sketchbook).
  5. From the "Open" dialog that opens, select the .zip file of the library.
  6. Click the Open button.
  7. Wait for the import to finish.

Thanks for your email, I only appear to have access to this zip from another computer which has a CD drive and where I find the libraries I have so far used. Apologies for being so thick

No cause for apologies. This can be very confusing stuff. Please let me know if you have any questions and problems and I'll see if I can help get you up and running with Arduino Web Editor.

Thanks, so how would I access the zip file from my main computer, where I'd like to do my coding from and which does not have a CD drive. I can't see how to navigate to the correct zip using the web editor?

The .zip file will need to be accessible on a computer you can open Arduino Web Editor on. But you only need that for the import. Once you have imported the library, it is stored on Arduino's server on the cloud, so it will be accessible when you are logged in to Arduino Web Editor from any computer

I extracted this SR04 file from my CD onto my computer, and then followed your 7 point plan of instructions down to number 6, but unfortunately I'm then presented with a message that tells me; Libraries could not be imported, parse library properties not found. Any advice?

The reason for this error is that modern Arduino libraries have a metadata file named library.properties. The Arduino IDE has support for the old library format in order to provide backwards compatibility, but Arduino Web Editor only supports the new format of library.

It doesn't take much effort or special knowledge to convert a library to the new format though.

Please do this:

  1. Unzip the library .zip file.
  2. Delete the .zip file.
  3. Open the unzipped folder. You should now see SR04.h and maybe some other files as well.
  4. Create a new file named library.properties
  5. Click the icon that looks like two pieces of paper that appears at the top right corner of the code block below when you hover your mouse pointer over it. This will copy the text to the clipboard.
    name=SR04
    version=0.0.0
    author=unknown
    maintainer=nobody
    sentence=A library for the SR04
    paragraph=
    category=Sensors
    url=http://example.com/
    architectures=*
    
  6. Open the library.properties file you created in a text editor.
  7. Press Ctrl+V. This will paste the copied text into your text editor.
  8. Save the library.properties file.
  9. Create a new .zip file from the library folder.
  10. Repeat the import procedure I described in my previous reply.

Thanks for your continued patience, but now when I attempt to create a new file named library.properties, I get the message;
Error creating file, not implemented.

  • could I simply download these libraries from elegoo as suggested on my CD onto my favoured computer?

Please provide a detailed description of what you did when you attempted to create the file.

I appear to have mislaid your message explaining how to create this library.properties file. could you please repeat it, allowing me to tell you the exact actions I took. Thanks

Here:

Thanks, so when I attempt to extract this HC-SR04 file, I'm asked where I'd like to copy to (strange it should ask about copying)....... I chose to download it to my own personal download folder on my C drive......I then delete this folder from my C drive....then, head back to my E drive, where my CD is held and open up the original HC-SR04 folder, and select create new file, I type libraries.properties and hit the complete button......then I get the, Error Creating file, Not implemented, message.

But, like I said before, could I not simply open up the old libraries from my original download of Elegoo on my preferred computer and perform the operation necessary to allow amalgamation of the libraries?

You're not supposed to delete the folder. I did say to delete the .zip file because I assumed you had copied the .zip file from the CD to your computer and I didn't want you to get mixed up between the original .zip file and the updated one you are going to create at step (9). But it's not required for you to delete it.

Most likely because you're trying to create the file on the CD drive. You need to create it on your hard drive.

Yes.

Thanks for all your help, I think I'm just going to continue using my old laptop for coding and where I have access to both libraries.

I think it will be a whole lot easier if I just continue using my old laptop for coding, it has access to both libraries
Thanks for all your help and patience.

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

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