Revision [263]

This is an old revision of reportOnDisplay made by AdminUser on 2015-10-03 23:10:45.

 

FunctionsAndClasses

display_18


  1. // www.officinecibernetiche.net
  2. /******************************
  3.  *       displayMessages      *
  4.  ******************************/
  5. void displayMessages(int X, int Y, const char* message)
  6. {
  7.   /* La visualizzazione su display รจ relativamente lenta.
  8.      Usare solo per processi non ripetitivi e in condizioni di
  9.      navigazione sicura (lontano da ostacoli o a robot fermo).
  10.      */
  11.  
  12.   //Serial.println(message);  // Togliere. Qui si blocca se non presente il TFT
  13.  
  14.   // set negative value to use tft.print
  15.   if (X >= 0 && Y >= 0)
  16.   {
  17.     tft.setCursor(X, Y);
  18.   }
  19.   tft.println(message);
  20.   return;
  21. }
  22.  
  23.  
  24. // DISPLAY 1.8" TFT
  25. void display_Setup()
  26. {
  27.   Serial.println("Initializing Display");
  28.   logEvent2SD("Initializing Display");    // log event on SD card
  29.   digitalWrite(TFT_RST, HIGH); // reset off
  30.   tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
  31.   tft.fillScreen(ST7735_BLACK);
  32.   tft.setTextColor(ST7735_GREEN);
  33.   tft.setTextSize(1);  // normal heigth (small)
  34.   tft.setTextWrap(true);
  35.   tft.setCursor(0, 0);
  36.  
  37.   logEvent2SD("Display ready");    // log event on SD card
  38.   displayMessages(-1, -1, "1. Display ready");
  39. }
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki