The Arduino library cannot be successfully installed.

Asked 2 months ago, Updated 2 months ago, 5 views

I am trying to install a library called "pitsches.h" on Arduino IDE according to the textbook.
 Sketch→Include library→Install library in .ZIP format
If you select a ZIP library (pits.zip) in ,

The library named "pitsches" already exists.

The error appears."When I checked the pull-down menu that appears in the sketch→ library, ""pitches"" was not displayed."Even if I compile it as it is, I get the error "pitsches.h: No such file or directory", so I can't seem to install the library.By the way, the following is the full text of the error message when compiled:

 passive_buzzer:4:10:fatal error:pitches.h:No such file or directory
 # include "pitches.h"
          ^~~~~~~~~~~
compilation terminated.
exit status1
pits.h —No such file or directory

The results were the same whether "pitches.h" was enclosed in "" or ">" on the source code.

Extracting "pitches.zip" created a folder called "pitches", and only one file called "pitches.h" was created in it.When I tried to delete the "pitches" folder and compress only the "pitches.h" file in ZIP format, I got the error "The specified ZIP file does not contain a library."This does not appear to be a folder configuration issue for the original file.

"pitches.zip" is located in the "Document/Arduino/Libraries/" folder of the user folder.I don't remember having any special access restrictions on the files inside, but when I try to edit the files, Mac OS asks for the user'sTherefore,
 System Preferences → Security and Privacy → Full Disk Access
I tried adding Arduino in , but the situation didn't change.

Another "Document/Arduino/Libraries/" library file had the same results.

It's been a long time, but if you know how to install the library well with Arduino IDE, please give me some advice.

Environment:
Arduino: 1.8.13 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega 2560 (Mega 2560)"

arduino

2022-09-30 11:09

1 Answers

Now we know why the library cannot be installed!The location of the library seems to have been bad.I was able to install and include the library using the following steps.

Sketchbook location can be specified in "Arduino"→"Preferences" on the main menu.This method worked for another sketchbook attached to Arduino and its associated libraries.

Sorry for the trouble.


2022-09-30 11:09

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.