Hi, I'm Lesha. I have a problem that Arduino doesn't see my module, when it colors module orange. I just don't understand why, so help me please <3.
Error:
Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno"
swanky_juttuli1:1:10: fatal error: Adafruit_NeoPixel.h: No such file or directory
#include <Adafruit_NeoPixel.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Adafruit_NeoPixel.h: No such file or directory
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
A proof that Arduino sees the module AND DOESN'T SEE IT IN ONE TIME:
Hi @LeshaTheBeginner. I'm going to ask you to provide some additional information that might allow us to determine the cause of the problem.
NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.
Please do this:
Select File > Preferences from the Arduino IDE menus.
Check the box next to "Show verbose output during: ☐ compilation".
Click the OK button.
Select Sketch > Verify/Compile from the Arduino IDE menus.
After the compilation fails you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button.
This copies the full output to the clipboard.
Open a forum reply here by clicking the Reply button.
Click the </> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press Ctrl+V.
This will paste the compilation output into the code block.
Move the cursor outside of the code tags before you add any additional text to your reply.
Click the Reply button to post the output.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:
Open a forum reply here by clicking the Reply button.
Click the "Upload" icon () on the post composer toolbar:
Select the .txt file you saved.
Click the Open button.
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 .txt file onto the post composer field to attach it.
Thanks! I was looking for something exceptional in the path of the library, and I do see something that might be the cause:
I remember a problem with library discovery in paths that contain extended (not sure that is the right term) characters as you have in the Документы folder name. Unfortunately I can't seem to find the bug report about that. I don't remember whether it has been fixed already (you are using a significantly outdated version of Arduino IDE). I just tried reproducing the error and was not able to even using Arduino IDE 1.8.12 like you. But I am on my Linux machine right now and it might well be Windows-specific.
I don't have access to a Windows machine right now due to a power outage at my location but I will try to investigate this later once the power is restored. I thought I should go ahead and post my current hypothesis now in case it might be useful to any ongoing discussion in the meantime.
If you want to run some experiments:
Determine whether the path is the cause by changing the "Sketchbook location" preference to a different path containing only ASCII characters in the Arduino IDE preferences, reinstall the library, then try compiling the sketch again.
Determine whether the bug was fixed already by installing the latest version of Arduino IDE and trying to compile the sketch with the "Sketchbook location" set to the current path (C:\Users\lesha\OneDrive\Документы\Arduino).
I was able to reproduce the bug on my Windows machine. Unfortunately I found it still occurs even with the latest version Arduino IDE 2.0.3.
The bug is being tracked by the Arduino developers here:
Arduino IDE absolutely should support any valid path, but for now we must make the best of the software we have and use a workaround for the bug. The workaround is to configure the IDE to use a sketchbook location that has only ASCII characters in the path. I'll provide instructions:
Select File > Preferences from the Arduino IDE menus.
Click the "Browse" button to the right of the "Sketchbook location" preference field.
In the ""Select new sketchbook location" dialog that opens, select any folder on your computer that is under a path that contains only ASCII characters (e.g., C:\Users\lesha\Documents\Arduino)
Click the "Open" button in the ""Select new sketchbook location" dialog.
Click the "OK" button in the "Preferences" dialog.
The libraries are installed under the sketchbook folder, so changing the "Sketchbook location" preference will cause all the libraries you installed before to no longer be accessible to Arduino IDE. From your screenshot, I see you don't have very many libraries. So it might be easiest to just use Arduino Library Manager (Sketch > Include Library > Manage Libraries...") to reinstall the libraries you need. Alternatively, you can use Windows "File Explorer" to copy the folders from the old sketchbook location to the new location.
Please let me know if you have any questions or problems while following those instructions.
Not quite true; it depends on what is in that Adafruit_NeoPixel directory. So make sure that that directory is correctly populated; it should at least contain the file Adafruit_NeoPixel.h. Below a screenshot of what it should look like.
There seems to be a common problem with library detection when using OneDrive; I do not know why.
You can try to create a "normal" install directly on the C drive (any other drive on your system will probably also work),
Under file → preferences in the IDE, change the sketchbook directory to C:\Users\lesha\Documents\Arduino.
Navigate to that directory using windows explorer and create a directory libraries.
Restart the IDE; just for good measure.
Install the library, either using library manager or copying the directory Adafruit_Neopixel from OneDrive to the new libraries` directory.
I also would have suspected OneDrive if not for the presence of the folder named Документы, but I was able to reproduce the bug with a sketchbook location under a folder named Документы that was not on OneDrive so I don't think OneDrive is the culprit this time. It is possible we have a "problem stack" where either OneDrive or the Документы folder name will break the IDE, but I would suggest focusing exclusively on the known problem with the Документы folder name for now.