Home ArduinoArduino Code Esplora TFT example

Esplora TFT example

by shedboy71

In this example we need to connect a TFT LCD to our Esplora, here is a picture of the TFT

espora tft

espora tft

The code is a basic example, simply toggling between 2 background colours

Code

[codesyntax lang=”cpp”]

#include <TFT.h>
#include <SPI.h>

bool black = false;

void setup()
{
    EsploraTFT.begin();
}

void loop()
{
    if (black) {
        EsploraTFT.background(255, 255, 255);
        black = false;
    }
    else {
        EsploraTFT.background(0, 0, 0);
        black = true;
    }
    delay(1000);
}

[/codesyntax]

 

Links
Esplora Game programming board Leonardo upgrade Version Atmega32U4

1.8 Inch TFT LCD Expansion Support Micro SD Special-purpose For Arduino Esplora

You may also like