Fixing Arduino TFT LCD White Screen Problems

My Arduino TFT Touch Screen Project

I’m working on a hobby project where I’m building Arduino gadgets.

The biggest problem working on Arduinos is that they are more or less experimental and finding drivers and software packages can be quite challenging. Often, it becomes the most time consuming part of any Arduino project.

Arduino TFT LCDs

Recently, I’ve started experimenting with Arduino TFT LCDs and what a joy it is to find all the missing libraries and “How-To” resources to pull this off.

I’m posting this information because it helped me with the issue I was having.

Sometimes it is not just the drivers, but the software to makes Arduino hardware run that often sends you down the rabbit hole. Often, you’ll spend hours troubleshooting your project over a code bug but never being 100% sure you hardware isn’t failing.

Once I finally found the right drivers and a couple of code tweaks, I finally got the 2.4 inch TFT LCD to work a bit and even a drawing app that let you draw with your finger or stylus.

You can find more detailed information and some sample code on Arduino’s Liquid Crystal page.

Arduino Code Example: TFT LCD
(lcd.ino)

As you can see in the code example below, #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { lcd.begin(16, 2); lcd.print("hello, world!"); } void loop() { }

Arduino Code Example: TFT LCD
(lcd_clear.ino)

This example is similar but we added a line to “setCursor”.

I saved this file as lcd_clear.ino then pushed it to the Arduino and it ran.

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.setCursor(2, 1);
  lcd.print("TGIF!!!");
}

void loop() {
 
}

Troubleshooting Arduino TFT LCDs

Below are some videos that were helpful to me in troubleshooting my Arduino TFT LCD problems. Use these video along with the resources I reference earlier and I’m sure you’ll find a way to make it all work.

Video: Arduino TFT White Screen Fix

Video: Arduino TFT Touch Screen Tutorial

How to Make an Arduino Based Temperature Monitor with Code Example

I’m taking a class on how to build Arduino devices.

This morning’s Arduino lesson used a temperature sensor to read the temperature and output it to the Arduino serial monitor.


Here is my Arduino code which is a combo of code from the class plus my attempt to integrate an alarm to it which I got from a combination of YouTube and Arduino online resources.

The code is my own creation based on stuff I found. 

It is free for you to use copy improve and share.  Enjoy!

Arduino Based Temperature Monitor Sample Code

int tempPin = A1; //Sets Analog Pin for Temp Sensor
int buzzer = 12; //Set alarm pin for peiezio sensor
int alertTemp = 78;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600); //Starts serial monitor output
  pinMode(buzzer,OUTPUT); //initialize the buzzer pin as an output
  }

void loop() {
  // put your main code here, to run repeatedly:
  int sensorVal = analogRead(tempPin); //Reads the temperature sensor
  float voltage = sensorVal * 5; //Turns sensrVal to Voltage
  voltage /= 1024; //Divides voltage by 1024 and sets voltage to that result
  float tempC = (voltage - .5) * 100; //Determines temp inCelsius from Voltage
  float tempF = (tempC * 9 / 5)  + 32; //Determines temp in Fahrenheit from Celsius
  
  /***************** Begin Loop for alarm if temp is above ***********************/
   unsigned char i; //define a variable
   if(tempF > alertTemp) {
    Serial.println(tempF); //Prints value of tempF variable anbd end line
    Serial.print("Celsius Temp: "); //Prints Title
    Serial.print(tempC);
    Serial.print(" Fahrenheit Temp: "); //Prints Title
    delay(1000); //delay for 1000 milliseconds
  
      //output an frequency
      for(i=0;i<80;i++) {
        digitalWrite(buzzer,HIGH);
        delay(1);//wait for 1ms
        digitalWrite(buzzer,LOW);
        delay(1);//wait for 1ms;
       }
      //output another frequency
      for(i=0;i<100;i++){
        digitalWrite(buzzer,HIGH);
        delay(2);//wait for 2ms
        digitalWrite(buzzer,LOW);
        delay(2);//wait for 2ms;
       }
   }
   else {
    digitalWrite(buzzer,LOW);
   }
  /***************** End Loop for alarm if temp is above ***********************/
  
  Serial.println(tempF); //Prints value of tempF variable and end line
  Serial.print("Celsius Temp: "); //Prints Title
  Serial.print(tempC);
  Serial.print(" Fahrenheit Temp: "); //Prints Title
  delay(1000); //delay for 1000 milliseconds
}