From 91b8e248d346bd5508601341f663247bc0268acd Mon Sep 17 00:00:00 2001 From: Bodmer Date: Tue, 3 Jan 2023 22:20:48 +0000 Subject: [PATCH] Remove example The use of a setup file in sketches only works in certain circumstances. --- .../Generic/Sketch_with_tft_setup/Read_Me.ino | 26 --------------- .../Sketch_with_tft_setup.ino | 19 ----------- .../Sketch_with_tft_setup/platform.local.txt | 1 - .../Generic/Sketch_with_tft_setup/tft_setup.h | 32 ------------------- 4 files changed, 78 deletions(-) delete mode 100644 examples/Generic/Sketch_with_tft_setup/Read_Me.ino delete mode 100644 examples/Generic/Sketch_with_tft_setup/Sketch_with_tft_setup.ino delete mode 100644 examples/Generic/Sketch_with_tft_setup/platform.local.txt delete mode 100644 examples/Generic/Sketch_with_tft_setup/tft_setup.h diff --git a/examples/Generic/Sketch_with_tft_setup/Read_Me.ino b/examples/Generic/Sketch_with_tft_setup/Read_Me.ino deleted file mode 100644 index c5e8bef..0000000 --- a/examples/Generic/Sketch_with_tft_setup/Read_Me.ino +++ /dev/null @@ -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. -*/ diff --git a/examples/Generic/Sketch_with_tft_setup/Sketch_with_tft_setup.ino b/examples/Generic/Sketch_with_tft_setup/Sketch_with_tft_setup.ino deleted file mode 100644 index 8674759..0000000 --- a/examples/Generic/Sketch_with_tft_setup/Sketch_with_tft_setup.ino +++ /dev/null @@ -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 -#include // 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() { -} diff --git a/examples/Generic/Sketch_with_tft_setup/platform.local.txt b/examples/Generic/Sketch_with_tft_setup/platform.local.txt deleted file mode 100644 index 5f404fa..0000000 --- a/examples/Generic/Sketch_with_tft_setup/platform.local.txt +++ /dev/null @@ -1 +0,0 @@ -build.extra_flags=-I{build.source.path} diff --git a/examples/Generic/Sketch_with_tft_setup/tft_setup.h b/examples/Generic/Sketch_with_tft_setup/tft_setup.h deleted file mode 100644 index 54e5a5c..0000000 --- a/examples/Generic/Sketch_with_tft_setup/tft_setup.h +++ /dev/null @@ -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