Page 48 - Gartenbahn
P. 48

47


               46 {
               47 DisplayInit(); // Initialize the displays
               48 }
               49
               50
               51 /*********LOOP*********/
               52
               53 void loop(){
               54
               55 OLED0();
               56 OLED2();
               57 OLED3();
               58 OLED4();
               59 OLED5();
               60
               61 if ( millis() - lastRun >= INTERVAL )
               62 {
               63 Uhr();
               64 lastRun += INTERVAL;
               65 }
               66 }
               67
               68
               69 /*****Unterprogramm**********/
               70
               71 /*****Display0*************/
               72 void OLED0()
               73 {
               74 tcaselect(3);
               75
               76 u8g2.firstPage();
               77 do {
               78
               79 u8g2.setFont(u8g2_font_unifont_tf);
               80 u8g2.drawStr(0, 16,Ziel[0]);
               81 u8g2.drawStr(0, 31,Ziel[1]);
               82 u8g2.drawStr(78, 16,"Gleis1");
               83 u8g2.drawStr(78, 31,"Gleis2");
               84 u8g2.drawStr(0, 46,Ziel[2]);
               85 u8g2.drawStr(0, 61,Ziel[3]);
               86 u8g2.drawStr(78, 46,"Gleis3");
               87 u8g2.drawStr(78, 61,"Gleis4");
               88
               89 // /******** Display Something *********/
               90 // u8g2.drawCircle(20, 20, 14);
               91 // u8g2.drawCircle(40, 40, 10);
               92 // u8g2.drawFrame(45,5,30,20);
               93 // u8g2.drawBox(65,35,10,10);
               94 // u8g2.drawLine(85, 10, 100, 45);
               95
               96 }while( u8g2.nextPage() );
   43   44   45   46   47   48   49   50   51   52   53