FunctionsAndClasses

reportOnDisplay


  1. /// www.officinecibernetiche.net
  2. // Display some datas on display
  3. // usage: displayMessages(column, row, message)
  4.  
  5. void reportOnDisplay()   //SOSTITUIRE LE VARIABILI GLOBALI CON ALTRE LOCALI
  6. {
  7.   String message1;
  8.   String message2;
  9.   String message3;
  10.   String message4;
  11.   int str_len;
  12.   char* date = get_date();
  13.   char* time = get_time();
  14.  
  15.   tft.fillScreen(ST7735_BLACK);
  16.   tft.setTextColor(ST7735_GREEN);
  17.  
  18.   Serial.println(temper);
  19.   Serial.println(hum);
  20.   Serial.println(TH_char_array);
  21.  
  22.   message1 = "Date: "; message1 += date;
  23.   //str_len = message1.length() + 1;
  24.   message1.toCharArray(char_array1, 18);
  25.   displayMessages(0, 10, char_array1);
  26.  
  27.   message2 = "Time: "; message2 += time;
  28.   //str_len = message2.length() + 1;
  29.   message2.toCharArray(char_array2, 18);
  30.   displayMessages(0, 30, char_array2);
  31.  
  32.   message3 = "Temp: "; message3 += Temperatura; message3 += " ^C";
  33.   message3.toCharArray(char_array3, 18);
  34.   displayMessages(0, 50, char_array3);
  35.  
  36.   message4 = "Humi: "; message4 += Umidita; message4 += " %";
  37.   message4.toCharArray(char_array4, 18);
  38.   displayMessages(0, 60, char_array4);
  39. }
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki