Fail to import modified ADXL335 library to the Arduino IDE

I once found a bug in the recommended ADXL335 library from Arduino IDE, and I modified some codes and change several parameters after calibrating my accelerometer. What I did was downloading the original ADXL335 library zip file from Arduino IDE, opening it, and changing something in the .cpp and .h files. But after I compressed them again into a zip file, the IDE didn't allow me upload the zip. file. Could anyone please help me figure out how could I potentially solve the problem?

Please post the error message.

Thanks for your reply, what I received is :"selected file is not a valid library"

If I upload the zip file from the offline IDE instead of the online editor, the error message is : Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: library not valid

The IDE expects libraries to conform to certain standards, stated somewhere in the on line Arduino documentation. Most likely, your modified version does not conform to those standards.

Hi @amandaq. Please provide the ZIP file as an attachment in a reply here on this forum thread.

  1. Open a forum reply here by clicking the "Reply" button.
  2. Click the "Upload" icon (image) on the post composer toolbar:
    Upload icon on toolbar
    An "Open" dialog will open.
  3. Select the file in the "Open" dialog.
  4. Click the "Open" button.
    The dialog will close.
  5. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the file onto the post composer field to attach it.

Hi ptillisch, thanks for your reply, I tried another method by changing the library file in the Arduino folder located at Documents on my PC, it seems to work well.

Thanks for taking the time to post an update. I'm glad it is working now.

Regards,
Per

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