The shield uses only the SCL and SDA I2C pins, and 5V power and ground. You can use the I2C pins for other I2C sensors/devices as long as they do not share the same address. If you are using an Arduino UNO, Analog 4 and Analog 5 are shared with SCL/SDA so you can't use them. Likewise, Arduino Leonardos share SCL/SDA with Digital 2 & Digital 3 so those would not be available.
- 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:https://github.com/adafruit/Adafruit-RGB-LCD-Shield-LibraryYou 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:
http://learn.adafruit.com/arduino-tips-tricks-and-techniques/arduino-libraries
The Adafruit_RGBLCDShield
library handles button debouncing for you, when you use the readButtons()
function.
The shield will work fine with older Arduino boards. Extra pins were added to the R3 version of the Uno and Mega. These are duplicates of other header pins and are not required for proper operation of the shield.
Page last edited June 04, 2024
Text editor powered by tinymce.