![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Testanto funções Display
main.cpp
- Committer:
- henriquer
- Date:
- 2021-04-27
- Revision:
- 3:34ff58aca6db
- Parent:
- 2:f603020cd6ec
File content as of revision 3:34ff58aca6db:
// ****** Henrique ****** 22/04/21 // Testanto funções Display // ************** Display TFT- ILI9341 Versão V 3 ************** \\ #include "Arduino.h" // Testado com sucesso na NUCLEO-F103RB + ILI9341 Versão V 2 #include <MCUFRIEND_kbv.h> MCUFRIEND_kbv tft; Serial pc(SERIAL_TX, SERIAL_RX); // Assign human-readable names to some common 16-bit color values: #define BLACK 0x0000 #define BLUE 0x001F #define RED 0xF800 #define GREEN 0x07E0 #define CYAN 0x07FF #define MAGENTA 0xF81F #define YELLOW 0xFFE0 #define WHITE 0xFFFF #define GRAY 0x8410 void setup() { uint16_t ID = tft.readID(); // tft.begin(ID); } void loop() { for ( int i = 0; i<4 ;i++){ tft.fillScreen(BLACK); tft.print("INSPER-LSM "); tft.setTextColor(RED);; tft.setCursor(30, 160); tft.setTextSize(3); delay(500); tft.fillScreen(BLUE); tft.print("INSPER-LSM "); tft.setTextColor(RED);; tft.setCursor(30, 160); tft.setTextSize(3); delay(500); tft.fillScreen(YELLOW); tft.print("INSPER-LSM "); tft.setTextColor(RED);; tft.setCursor(30, 160); tft.setTextSize(3); delay(500); tft.fillScreen(GRAY); tft.print("INSPER-LSM "); tft.setTextColor(RED);; tft.setCursor(30, 160); tft.setTextSize(3); delay(500); } tft.setTextColor(RED);; tft.setCursor(30, 160); tft.setTextSize(3); delay(5000); } int main(){ setup(); while (1) { loop(); } }