IF I go to the line #include <PinButton.h> and press CTRL F12
Immediately jump to the PinButton.h file, but if I start to translate the file below it I got the following error message:
D:\Pico Audio\Hangolo\Hangolo.ino:15:10: fatal error: PinButton.h: No such file or directory
15 | #include <PinButton.h>
| ^~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: PinButton.h: No such file or directory
// Antal Péter 2023 szeptember 6
#define RED_LED 14
#define GREEN_LED 25
#define PUSH_BUTTON 13
#define ON 1
#define OFF 0
// GPIO pin numbers
#define pDOUT 18 //Thony DA calibrator kompatibilis kimenetek
#define pBCLK 16
#define pWS (pBCLK + 1)
#define pMCLK 29 // optional MCLK pin
#define MCLK_MUL 256 // depends on audio hardware. Suits common hardware.
#include <PinButton.h>
#include <I2S.h>
#include <pio_i2s.pio.h>
I moved your topic to an appropriate forum category @antal_peter.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
At worse, that apparent problem in the language server logs would cause the "context aware" features such as "Go to Definition" to not work. It would not cause a compilation failure because clangd is not used at all by the Arduino build system (only by the language server, which does not affect the build). In fact, your finding:
tells us that clangd is working perfectly.
However, you might be on the right track by looking at the characters in the library path anyway. There is a known bug that can cause the spurious "No such file or directory" error when a library is under a path that contains characters beyond basic ASCII:
I did an experiment with compiling a sketch that uses a library installed under a path that contained Péter and I did not experience the error.
The explanation for the different outcome from my experiment compared to yours might be that the forum software changed the encoding of the é character, meaning that the character I copied from your forum post and used in the folder name on my file system is different from the character in the folder name on your file system. Perhaps this could be avoided if you followed best practices by wrapping non-prose content in your posts (e.g., code, paths, tool output, logs) in backticks, which can be easily done by highlighting the text in the post composer and then clicking the "<CODE/>" icon on the post composer toolbar, or else by adding the backticks manually.
It was also reported that the problem is dependent on the system locale, so maybe the explanation is that we have different locale settings?
In case it might reveal some clue, I'm going to ask you to post the full verbose output from a compilation.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Check the box next to "Show verbose output during: ☐ compilation" in the "Preferences" dialog.
Click the "OK" button.
Select Sketch > Verify/Compile from the Arduino IDE menus.
Wait for the compilation to fail.
You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
Open a forum reply here by clicking the "Reply" button.
Click the <CODE/> 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:
A dialog will open.
In the dialog, 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.