Can't use a library

I'm trying to get started with the Web Editor.

Recently I just upload a library that's needed for my air quality project. I zip the library and upload it.

And I get the message:

Libraries that could not be uploaded: [] library.properties not found

After few minute research, I put a library.properties file in there, it successfully uploaded.

but the weird things happen here, when I try to use the sample code in the library, it said:

Using library wavesharesharpdustsensor-master at version 1.0.0 in folder: /tmp/774189247/custom/wavesharesharpdustsensor-master

In file included from /tmp/774189247/DustSensor/DustSensor.ino:2:0:

/tmp/774189247/custom/wavesharesharpdustsensor-master/WaveshareSharpDustSensor.h:7:22: fatal error: arduino.h: No such file or directory

#include "arduino.h"

^

compilation terminated.

exit status 1

seems like it is requesting a .h file, but there is already one in the library.

here is the url of the library I used( didn't include library.properties):GitHub - ItKindaWorks/wavesharesharpdustsensor: Arduino library for Waveshare's Sharp Infrared Dust Sensor breakout board

Any ideas?

Thanks,

Wen Chi

The author of that library spelled Arduino.h wrong. They are probably using Windows and so they didn't notice the error, since Windows is filename case-insensitive. However, Arduino Web Editor runs on Linux, which is filename case-sensitive, so you need to get your filename case right.

You can fix it by:

On your computer, open WaveshareSharpDustSensor.h in a text editor.

Change line 7 from:

	#include "arduino.h"

to:

	#include "Arduino.h"

Save the file

Zip the fixed library.

Import the fixed .zip file to Arduino Web Editor. When it prompts you about whether you want to replace the existing library, confirm.

I submitted a pull request to the parent repository of that fork to fix the bug:

Thank you so much, It did solve the problem !

Now I can easily upload it to my Arduino, Thank you again !

You're welcome. I'm glad to hear it's working now. Enjoy!
Per