// STM32 Nucleo-C031C6 SPI LCD Example
// Simulation: https://wokwi.com/projects/365549388158011393
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 2
#define TFT_CS 3
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
unsigned char num = 0;
void setup() {
Serial.begin(115200);
Serial.println("Hello Pride");
tft.begin();
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(3);
}
void loop()
{
//tft.fillScreen(0x0000);
tft.setTextColor(ILI9341_BLACK);
tft.setCursor(0, 0);
tft.println(" ");
tft.setTextColor(ILI9341_GREEN);
tft.setCursor(0, 0);
tft.println(num);
num++;
// Serial.println(num);
}
/*
int main(void)
{
unsigned char num = 0;
Serial.begin(115200);
Serial.println("Hello, WOKWI");
tft.begin();
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_RED);
tft.setTextSize(3);
tft.println("Hello STM2");
tft.setCursor(24, 160);
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(2);
tft.println("I can do SPI :-)");
while(1)
{
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_RED);
tft.setTextSize(3);
tft.println("Hello STM2");
tft.setCursor(24, 160);
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(2);
tft.println("I can do SPI :-)");
/*
while (num > 100){
tft.fillScreen(0);
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_RED);
tft.setTextSize(4);
tft.println("num");
num++;
}
*/