Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/********* Pleasedontcode.com ********** Pleasedontcode thanks you for automatic code generation! Enjoy your code! - Terms and Conditions: You have a non-exclusive, revocable, worldwide, royalty-free license for personal and commercial use. Attribution is optional; modifications are allowed, but you're responsible for code maintenance. We're not liable for any loss or damage. For full terms, please visit pleasedontcode.com/termsandconditions. - Project: **Display Testing** - Source Code NOT compiled for: Arduino Uno - Source Code created on: 2025-02-12 03:37:44 ********* Pleasedontcode.com **********/ /****** SYSTEM REQUIREMENTS *****/ /****** SYSTEM REQUIREMENT 1 *****/ /* make sure ST7789V display not white screen */ /****** END SYSTEM REQUIREMENTS *****/ /* START CODE */ /****** DEFINITION OF LIBRARIES *****/ #include
//https://github.com/adafruit/Adafruit-GFX-Library #include
// Added for ST7789 display support #include
// Added for SPI communication /****** FUNCTION PROTOTYPES *****/ void setup(void); void loop(void); /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/ #define TFT_CS 6 #define TFT_DC 8 #define TFT_RST 7 Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); // Instance of the display class void setup(void) { // put your setup code here, to run once: Serial.begin(9600); Serial.println("Initializing TFT display..."); tft.init(240, 320, SPI_MODE0); tft.setRotation(1); // Try different values (0-3) Serial.println("Display initialized!"); // Fill the screen with a color to avoid white screen issue tft.fillScreen(ST77XX_BLACK); // Set initial screen color to black delay(500); } void loop(void) { // put your main code here, to run repeatedly: tft.fillScreen(ST77XX_BLACK); // Clear screen each loop tft.setTextColor(ST77XX_WHITE); tft.setTextSize(2); tft.setCursor(50, 50); tft.println("ST7789 TEST"); delay(1000); } /* END CODE */
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)