Various updates

RM68120 support for RP2040 added
Various other updates and typo corrections
This commit is contained in:
Bodmer committed 2023-02-20 19:03:44 +00:00
1 parent 0bad8c7acc
commit 34850973a0
20 files changed
+466 -501

No files matched your search

@@ -1,5 +1,5 @@
// This is a test sketch being developed for a new arc based meter widget
// The meter grahic is fully anti-aliased to avoid jaggy pixelated edges
// The meter graphic is fully anti-aliased to avoid jaggy pixelated edges
// For this demo randomly sized meters are drawn, cycled and redrawn a random size.
// The meter is ramped up and down 0-100 and 100-0, then pauses before a new
@@ -58,25 +58,26 @@ void setup(void) {
tft.init();
tft.fillScreen(TFT_BLACK);
tft.drawRect(0, 0, tft.width(), tft.height(), TFT_GREEN);
// Set "cursor" at top left corner of display (0,0) and select font 4
tft.setCursor(0, 0, 4);
tft.setCursor(0, 4, 4);
// Set the font colour to be white with a black background
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextColor(TFT_WHITE);
// We can now plot text on screen using the "print" class
tft.println("Initialised default\n");
tft.println("White text");
tft.println(" Initialised default\n");
tft.println(" White text");
tft.setTextColor(TFT_RED, TFT_BLACK);
tft.println("Red text");
tft.setTextColor(TFT_RED);
tft.println(" Red text");
tft.setTextColor(TFT_GREEN, TFT_BLACK);
tft.println("Green text");
tft.setTextColor(TFT_GREEN);
tft.println(" Green text");
tft.setTextColor(TFT_BLUE, TFT_BLACK);
tft.println("Blue text");
tft.setTextColor(TFT_BLUE);
tft.println(" Blue text");
delay(5000);
@@ -87,22 +88,23 @@ void loop() {
tft.invertDisplay( false ); // Where i is true or false
tft.fillScreen(TFT_BLACK);
tft.setCursor(0, 0, 4);
tft.drawRect(0, 0, tft.width(), tft.height(), TFT_GREEN);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.println("Invert OFF\n");
tft.setCursor(0, 4, 4);
tft.println("White text");
tft.setTextColor(TFT_WHITE);
tft.println(" Invert OFF\n");
tft.println(" White text");
tft.setTextColor(TFT_RED, TFT_BLACK);
tft.println("Red text");
tft.setTextColor(TFT_RED);
tft.println(" Red text");
tft.setTextColor(TFT_GREEN, TFT_BLACK);
tft.println("Green text");
tft.setTextColor(TFT_GREEN);
tft.println(" Green text");
tft.setTextColor(TFT_BLUE, TFT_BLACK);
tft.println("Blue text");
tft.setTextColor(TFT_BLUE);
tft.println(" Blue text");
delay(5000);
@@ -111,22 +113,23 @@ void loop() {
tft.invertDisplay( true ); // Where i is true or false
tft.fillScreen(TFT_BLACK);
tft.setCursor(0, 0, 4);
tft.drawRect(0, 0, tft.width(), tft.height(), TFT_GREEN);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.println("Invert ON\n");
tft.setCursor(0, 4, 4);
tft.println("White text");
tft.setTextColor(TFT_WHITE);
tft.println(" Invert ON\n");
tft.println(" White text");
tft.setTextColor(TFT_RED, TFT_BLACK);
tft.println("Red text");
tft.setTextColor(TFT_RED);
tft.println(" Red text");
tft.setTextColor(TFT_GREEN, TFT_BLACK);
tft.println("Green text");
tft.setTextColor(TFT_GREEN);
tft.println(" Green text");
tft.setTextColor(TFT_BLUE, TFT_BLACK);
tft.println("Blue text");
tft.setTextColor(TFT_BLUE);
tft.println(" Blue text");
delay(5000);
}
@@ -184,5 +184,5 @@ int8_t getPinName(int8_t pin)
if (user.esp == 0x32F) return pin;
return -1; // Invalid pin
return pin; // Invalid pin
}