Help! Newbie with basic issues on compiling a library for ILI9341 LCD Screen

21 Apr 2016

Hello,

I am having trouble compiling this library: https://developer.mbed.org/users/infotech1/code/ili9341_test/ , to run some software on this LCD screen: https://www.adafruit.com/products/1770 . If I am correct, since they are the same hardware underneath, ILI9341_test should compile fine and work on this LCD screen, but I may be horribly wrong. I am a newbie at this. The issue when I compile the library online is that SPI_MISO, SPI_MOSI, and SPI_SCK . These values don't seem to exist in the library. I am trying to find out what I can change to make the values work. Is this a problem with PinNames.h (it doesn't seem like it, but I don't know where it would be), or somewhere else? Should I manually enter the values of the pins? I am not sure.

Thanks for any help.

26 Apr 2016

SPI_MISO, SPI_MOSI and SPI_SCK are indeed coming from PinNames.h and those differ per board that you use. You can look at the pinout of the board you have and manually create the defines via something like (in main.cpp):

#define SPI_MISO p6
#define SPI_MOSI p7
#define SPI_SCK  p8

#include "whatever-library.h"

F.e. in the pinout of the K64F you'd use D12, D11, D13.