mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-03 12:44:46 +02:00
Remove example
The use of a setup file in sketches only works in certain circumstances.
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
It is possible to bypass the blockage put in place by the Arduino IDE so that a setup file can be included
|
||||
by a sketch.
|
||||
|
||||
The procedure is as follows:
|
||||
|
||||
1. Find the folder containing the boards.txt file for the processor board package you are using. To do this
|
||||
click the IDE menu "File->Preferences". At the bottom of that window click the link to the preferences.txt
|
||||
file. This will open a folder. Navigate to find the folder containing the "boards.txt" file for the
|
||||
processor you are using. Example paths for RP2040 and ESP32 are:
|
||||
|
||||
C:\Users\xxxxx\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\2.5.2
|
||||
C:\Users\xxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4
|
||||
|
||||
2. Copy the platform.local.txt file to that folder. A copy of the "platform.local.txt" is in this sketch
|
||||
folder, press Ctrl+K to open the folder.
|
||||
|
||||
3. Close the Arduino IDE and open it again so the added file is recognised.
|
||||
|
||||
4. This step is already done in this sketch, but to adapt you own sketches, open the sketch and add a
|
||||
new tab, "tft_setup.h" in the main sketch, put all the tft library setup information in that header.
|
||||
The tab header name must be tft_setup.h
|
||||
|
||||
IMPORTANT: You will need to remember to add the platform.local.txt file again if you upgrade the IDE or
|
||||
the board package version. Note that the file must be added to each processor board package you are using.
|
||||
*/
|
@@ -1,19 +0,0 @@
|
||||
|
||||
// THIS SKETCH IS A TEMPLATE EXAMPLE ONLY AND IS NOT INTENDED TO BE RUN UNLESS MODIFIED!
|
||||
|
||||
// See ReadMe tab for instructions to add a "user setup" configuration file to your sketch
|
||||
|
||||
#include <SPI.h>
|
||||
#include <TFT_eSPI.h> // Hardware-specific library
|
||||
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
|
||||
|
||||
void setup(void) {
|
||||
tft.init();
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setCursor(0, 0, 4);
|
||||
tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
tft.println("Hello World");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
@@ -1 +0,0 @@
|
||||
build.extra_flags=-I{build.source.path}
|
@@ -1,32 +0,0 @@
|
||||
// This is a configuration setup file example for an RP2040 processor
|
||||
// Adapt as required for your own hardware configuration
|
||||
|
||||
#define RP2040_PIO_SPI
|
||||
|
||||
#define GC9A01_DRIVER
|
||||
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 240
|
||||
|
||||
#define TFT_MOSI 10
|
||||
#define TFT_MISO 9
|
||||
#define TFT_SCLK 8
|
||||
#define TFT_CS 7 // Chip select control pin
|
||||
#define TFT_DC 4 // Data Command control pin
|
||||
#define TFT_RST 5 // Reset pin (could connect to Arduino RESET pin)
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 66000000
|
||||
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
Reference in New Issue
Block a user