Hardware Reference
In-Depth Information
Enabling the SPI display in the IDE
Just as in the case of SerialLCD, you'll need to add the supporting code library for your
device. For this device, the library is found at http://www.sainsmart.com/sainsmart-1-8-spi-
lcd-module-with-microsd-led-backlight-for-arduino-mega-atmel-atmega.html . In order to
do so, perform the following steps:
1. Go to the site and then click on the Download link. This will download the
TFT18.rar file. Use an archive tool such as 7-Zip to unpack this file to the librar-
ies directory.
2. Now the library will be available for use. You will need to make one change. Go to
the library directory where you installed TFT18 and look for a file called
ST7735.h , as shown in the following screenshot:
3. You're going to edit the ST7735.h file. You can do that in Notepad if you are
working on a Windows system. You are going to change one line, as follows:
4. You are going to comment out the line that reads #include <WProgram.h>
using two // characters. Then, you will add the #include <Arduino.h> line
Search WWH ::




Custom Search