Testanto funções Display

Dependencies:   mbed

Revision:
3:34ff58aca6db
Parent:
2:f603020cd6ec
diff -r f603020cd6ec -r 34ff58aca6db main.cpp
--- a/main.cpp	Thu Apr 22 16:06:53 2021 +0000
+++ b/main.cpp	Tue Apr 27 21:22:12 2021 +0000
@@ -1,18 +1,16 @@
 // ******    Henrique  ****** 22/04/21
 // Testanto funções Display
-// ************** Display TFT-  ILI9341  Versão V 2 ************** \\
-
-
-
+// ************** 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
@@ -22,33 +20,62 @@
 #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()
-{
+ 
+int main(){
     setup();
     while (1) {
         loop();