C:\Users\NAME\OneDrive - NAME\Documents\Arduino\libraries\Mouse-master\src/Mouse.h:25:17: fatal error: HID.h: No such file or directory #include “HID.h”
^
compilation terminated.
Using library Mouse-master at version 1.0.1 in folder: C:\Users\NAME\OneDrive - NAME\Documents\Arduino\libraries\Mouse-master
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
I tried adding every mouse library I can find to no avail.
Instead of helping you solve a problem that is beyond my skills, let me instead suggest you consider doing 2 things:
Install Visual Studio Code (aka VS Code)
Add PlatformIO IDE extension to VS Code
Now open your WLED in VS Code / PlatformIO, and build the project. I think you will receive a great many fewer errors. FYI, PlatformIO handles all the libraries automatically because WLED was setup to work well with PlatformIO.
I downloaded WLED and then opened in VS Code / Platform IO, and then chose the build option. It downloaded the right libraries, and compiled the first time, no errors.
Thanks Mr Huggy-d1,
On your advice I make a time investment into VS code / platform IO. Looks like a great tool. I compiled a simple sunrise program by Ron the HookUp guy and with a few edits of his Arduino code I got it to take.
That’s felt good.
Still, the WLED code with the PIR usermod sill has be a bit confused.
which WLED file to I try and compile with vscode? With Arduino I opened wled00/wled.ino and the files in the directory showed up as tabs. VS code doesn’t seem to work that way.
Probably sounds like I have never used VScode before, which is exactly the case. appreciate your time.
Since WLED is already setup correctly to compile in platformio, you should just need to do two things:
In vs code, go to File -> Open Folder and select the WLED directory (not the wled00 one with the ino in it, but the root folder that contains the wled00)
In the root directory of the WLED source, open the file platformio.ini and add a ; in front of the line default_envs = travis_esp8266, travis_esp32. Now remove the semicolon and space in front of the environment you want to build for, d1_mini is ideal for most ESP8266 boards.
I can clearly see you’re trying to help and am grateful. but I "think ‘’ I did that already.
I’m sure I am missing something simple, probably obvious too. The screen shot shows that I get when I try and compile (the “check mark” in the bottom toolbar)…
It is telling you to install the Git client (for your O/S). That’s a source control software package github natively integrates with. If you scroll back in the terminal, what’s in red? Yellow should simply be warnings.
Also, in the icons on to the left of the “explorer” folder tree, one of them is for PlatformIO. Select that one and then select build.
I personally had more luck with that than picking or typing the correct task from the terminal task list.
I boulded everything in red, what’s not bolded is yellow except the very last part… I seem to be back to this HID.h thing, it’s frustrating as I can find no such library. But I’m not giving up, I just have no idea that to do about it.
BTY, I really like VS code BTY, thanks for pointing me in that direction. I just wish I could make this work.
OUTPUT::
#include “HID.h”
^
compilation terminated.
In file included from wled00\wled.h:2:0,
from wled00\colors.cpp:1: .pio\libdeps\d1_mini\ESP Async WebServer\src/AsyncJson.h:249:2: error: #endif without #if #endif
^
In file included from wled00\wled.h:12:0,
from wled00\colors.cpp:1: .pio\libdeps\d1_mini\Mouse\src/Mouse.h:25:17: fatal error: HID.h: No such file or directory
Try installing Github desktop, it’s handy to have either way and I believe it will install Git for windows with it automatically.
WLED does not use an HID.h library. The error indicates that the Mouse library, which is probably included as part of the ESP8266 core, wants to include it and probably can’t since it is not downloadable from GitHub. Just a wild guess, but installing Git would probably fix it
Thank you Air Cookie,
I installed both git for windows and github desktop. I’m not sure how that links up to PlatformIO / VS code.
The problem seems to be related to file “wled00\wled.h” references to #include <Mouse.h>, when I hover over it I get:#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:##################\wled\WLED-master\wled00\wled.cpp).C/C++(1696)
cannot open source file “HID.h” (dependency of “Mouse.h”)C/C++(1696)
If you have installed PlatformIO and VS Code and done nothing else other than perform some type of git request to retrieve the master WLED project, then the reference to mouse.h should not appear.
If however you downloaded some PlatformIO libraries yourself before trying to compile WLED, you need to remove those libraries.
If you told PlatformIO where your Arduino install was located, go and (temporarily) move your arduino folder, or rename it to Arduino.LeaveMeAlonePlease (or something fun like that).
Now try to compile / build WLED. It should not find any existing libraries on your PC, then it will attempt to download the correct libraries automatically during the compile / build phase.
It should download a lot of them the first time it runs through the build.
I’ve seen every one of these issues while floundering around unguided in VS Code / PlatformIO. Other fabulous WLED users helped me reset my VS Code / PIO and essentially dump the Arduino IDE completely. I didn’t have any Arduino code other than WLED, so that was fine by me.
Thanks to you and Tony and Christian. First because VS code is awesome and I’ll be using it from here out. and also for your guidance. I have no idea how hid.h got added to wled.h. there were several other "#include"s that were got on github. I downloaded a fresh copy of the source and recompiled and it worked. I’m testing the PIR user mod now.
Thanks again, I’m already testing VS code on other projects. never even heard of it till you introduced me.