hi Guys,
i all very new with the Arduino and coding and i really need help.
i wired a ILI9225 TFT and UNO board using the BASIC example _9225 file from the provided sketch but upon powering up the system, i see the TFT gives me scrambled lines.
This happens with the LED pin on Pin 3 of Arduino.
If i use pin 0 (which i should due to 5v supply), the screen stays white with no activity.
if i move from pin 3 to 0 whilst the screen scrambles, the image is perfect however it goes onto pause (does not continue its code)
i am using Hardware SPI currently. If i place the board on the Arduino as a shield, i only get a white screen.
i tried numerous libraries and adjusted the installation pins according to the code however nothing seems to work
code below
// Include application, user and local libraries
#include "SPI.h"
#include "TFT_22_ILI9225.h"
#ifdef ARDUINO_ARCH_STM32F1
#define TFT_RST PA1
#define TFT_RS PA2
#define TFT_CS PA0 // SS
#define TFT_SDI PA7 // MOSI
#define TFT_CLK PA5 // SCK
#define TFT_LED 0 // 0 if wired to +5V directly
#elif defined(ESP8266)
#define TFT_RST 4 // D2
#define TFT_RS 5 // D1
#define TFT_CLK 14 // D5 SCK
//#define TFT_SDO 12 // D6 MISO
#define TFT_SDI 13 // D7 MOSI
#define TFT_CS 15 // D8 SS
#define TFT_LED 2 // D4 set 0 if wired to +5V directly -> D3=0 is not possible !!
#elif defined(ESP32)
#define TFT_RST 26 // IO 26
#define TFT_RS 25 // IO 25
#define TFT_CLK 14 // HSPI-SCK
//#define TFT_SDO 12 // HSPI-MISO
#define TFT_SDI 13 // HSPI-MOSI
#define TFT_CS 15 // HSPI-SS0
#define TFT_LED 0 // 0 if wired to +5V directly
#else
#define TFT_RST 8
#define TFT_RS 9
#define TFT_CS 10 // SS
#define TFT_SDI 11 // MOSI
#define TFT_CLK 13 // SCK
#define TFT_LED 3 // 0 if wired to +5V directly
#endif
#define TFT_BRIGHTNESS 200 // Initial brightness of TFT backlight (optional)
// Use hardware SPI (faster - on Uno: 13-SCK, 12-MISO, 11-MOSI)
TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_LED, TFT_BRIGHTNESS);
// Use software SPI (slower)
//TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_SDI, TFT_CLK, TFT_LED, TFT_BRIGHTNESS);
// Variables and constants
uint16_t x, y;
boolean flag = false;