Page 49 - Gartenbahn
P. 49

48


               97 delay(50);
               98 }
               99
               100 /***** Display 1*************/
               101 void OLED1 ()
               102 {
               103 tcaselect(1);
               104
               105 u8g2.firstPage();
               106 do {
               107 /******** Display Something *********/
               108 u8g2.setFont(u8g2_font_logisoso24_tr);
               109 u8g2.drawStr(25, 60, logString); // Zeit
               110 u8g2.drawLine(0, 30, 120, 30);
               111
               112 u8g2.setFont(u8g2_font_10x20_tr);
               113 u8g2.drawStr(0, 25, "31.12.");   //Datum
               114 u8g2.drawStr(70, 25, "2021");   //Jahr
               115 /************************************/
               116 } while( u8g2.nextPage() );
               117 delay(50);
               118 }
               119
               120 /***** Display 2*************/
               121
               122 void OLED2 ()
               123 {
               124 tcaselect(0);
               125
               126 u8g2.firstPage();
               127 do {
               128 /******** Display erster Zug *********/
               129 u8g2.setFont(u8g2_font_7x14_tf);
               130 u8g2.drawStr(87, 13, "Gleis");
               131
               132 u8g2.setFont(u8g2_font_logisoso24_tr);
               133 u8g2.drawStr(90, 60, "01");
               134
               135 u8g2.setFont(u8g2_font_7x14_tf);
               136 u8g2.drawStr(2, 13, "Ziel:");
               137
               138 u8g2.setFont(u8g2_font_7x14_tf);
               139 u8g2.drawStr(2, 30, Ziel[0]);
               140
               141 u8g2.setFont(u8g2_font_7x14_tf);
               142 u8g2.drawStr(2, 47, "Abfahrt:");
               143
               144 u8g2.setFont(u8g2_font_7x14_tf);
               145 u8g2.drawStr(2, 64, Zeit[0]);
               147 u8g2.drawFrame(87,30,35,33);
               148 /************************************/
   44   45   46   47   48   49   50   51   52   53   54