Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TFT_eSPI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
TFT_eSPI
Commits
91b8e248
Commit
91b8e248
authored
Jan 03, 2023
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove example
The use of a setup file in sketches only works in certain circumstances.
parent
024453fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
78 deletions
+0
-78
examples/Generic/Sketch_with_tft_setup/Read_Me.ino
examples/Generic/Sketch_with_tft_setup/Read_Me.ino
+0
-26
examples/Generic/Sketch_with_tft_setup/Sketch_with_tft_setup.ino
...s/Generic/Sketch_with_tft_setup/Sketch_with_tft_setup.ino
+0
-19
examples/Generic/Sketch_with_tft_setup/platform.local.txt
examples/Generic/Sketch_with_tft_setup/platform.local.txt
+0
-1
examples/Generic/Sketch_with_tft_setup/tft_setup.h
examples/Generic/Sketch_with_tft_setup/tft_setup.h
+0
-32
No files found.
examples/Generic/Sketch_with_tft_setup/Read_Me.ino
deleted
100644 → 0
View file @
024453fc
/*
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.
*/
examples/Generic/Sketch_with_tft_setup/Sketch_with_tft_setup.ino
deleted
100644 → 0
View file @
024453fc
// 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
()
{
}
examples/Generic/Sketch_with_tft_setup/platform.local.txt
deleted
100644 → 0
View file @
024453fc
build.extra_flags=-I{build.source.path}
examples/Generic/Sketch_with_tft_setup/tft_setup.h
deleted
100644 → 0
View file @
024453fc
// 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment