- error: Adafruit_MCP23017.h: No such file or directory
- error: Adafruit_RGBLCDShield.h: No such file or directory
- error: 'Adafruit_RGBLCDShield' does not name a type
- error: 'lcd' was not declared in this scope
- error: 'BUTTON_UP' was not declared in this scope
- error: 'BUTTON_DOWN' was not declared in this scope
- error: 'BUTTON_LEFT' was not declared in this scope
- error: 'BUTTON_RIGHT' was not declared in this scope
- error: 'BUTTON_SELECT' was not declared in this scope
There are three possible causes for this:
1. You didn't download the library folder.
Adafruit has written some extra software to make it easy to use your shield. This software is contained in a library folder that you can download here:You download the folder by clicking on the Downloads button in the top right. You will have the option of downloading the library in one of two compressed formats: '.zip' or '.tar.gz'. Windows and Mac users will probably want to select .zip, while Linux users may prefer .tar.gz.
MacOS will automatically uncompress the downloaded file into a folder, which you should find in the Downloads folder.
Windows users can double-click on the downloaded file. This will open an Explorer window which will allow you to extract the compressed library folder.
(Continue to the next paragraph to find out what to do with the uncompressed download)
2. The library folder has the wrong name.After downloading and uncompressing the library folder, you must change the name of the folder to exactly "Adafruit_RGBLCDShield". Don't abbreviate, add any spaces, underscores or other characters. Make sure the capitalization is the same as shown here.
Once you've made sure the folder has the right name and is in the right place, you have to close and reopen the Arduino IDE, so that it will recognize the new library.(Continue to the next paragraph to find out where to put the library folder)3. The library folder is in the wrong place.When you installed your Arduino IDE, it created a 'sketch folder' for you (if you don't already know where that sketch folder is, go into the Arduino application's 'Sketch' menu, and select 'Show Sketch Folder').
Inside of the sketch folder, there should be another folder called 'libraries'. If not, create a new folder inside of the sketch folder, and name it "libraries" (the name must be exactly "libraries" - not "library" or"librarys" - not even "Libraries" with a capital 'L' ! ).
Move your new Adafruit_RGBLCDShield folder into this libraries folder.
if you're curious, you can learn more about libraries here: