I've been trying to get this LCD to work on an arduino nano atmega 328. So far i have found the MISO, MOSI, SCK, RESET, VCC and GND pins to connect onto the nano atmega328. I have the D/C, LED and CS pins left on the TFT 2.2" to place but not sure where they go in the nano. It says CS is pin 53 and DC is pin 49 on the Arduino DUE but what about on Nano?
Also i still need to know which library is relevant for the nano to use the tft 2.2" LCD. I've had a look online but there doesn't seem to be one available yet.
I recently had this come up in the compiler whilst uploading the script to the Nano atmega 328:
core.a(main.cpp.o): In function main': C:\Users\C\Desktop\arduino-1.0.5-r2\hardware\arduino\cores\arduino/main.cpp:11: undefined reference to setup'
C:\Users\C\Desktop\arduino-1.0.5-r2\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop'
Just before, another error message was appearing with a message saying 'there should be a class before the {' along the line of
class Adafruit_HX8340B : public Adafruit_GFX {
But i never touched it so i'm not sure what is going on. Can anyone help with this please?
When you see on peripherals some pins named MISO, MOSI we speak about SPI communication.
On AtMega328 (Nano o Uno) pins are fixed 13=SCK 12=MISO 11=MOSI SS=usually 10
Also on AtMega2560 (Mega) pins are fided. 52=SCK 50=MISO 51=MOSI SS=usually 53
For library
1.you must download the entire zip file here (button Download Zip on right):
2.extract the files from Zip and maintain the internal folders structure
Folder name will be Adafruit-HX8340B-master, rename in Adafruit_HX8340B
ATTENTION underscore and not minus char !!!
this folder must be copied under libraries of IDE.
This folder is named LIBRARIES and is a subfolder where you have the sketch folder
Check in Arduino IDE under "File->Preferences" label "Sketchbook location"
For example in my PC: => G:\Arduino_projects
under this folder I have LIBRARIES => G:\Arduino_projects\LIBRARIES
After copy you must have G:\Arduino_projects\LIBRARIES\Adafruit_HX8340B
Close IDE, restart it.
On IDE menu File->Examples->Adafruit_HX8340B you see 2 demo sketch
ATTENTION: this library require also Adafruit_GFX Library !!!!
It looks very similar but has sms functions. Unfortunately it can only work on Duo as shown in this video. Wonder if anyone can work out how to do sms for Nano as well?