Added display config: FLIP_DISPLAY

This commit is contained in:
Stefan Kremser
2018-03-28 09:47:30 +02:00
parent 485bfd1085
commit 01d62dda2a
12 changed files with 19 additions and 0 deletions

View File

@@ -76,6 +76,8 @@
SDA/MOSI = GPIO 13 (D7) */
//#define DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
//#define DISPLAY SH1106Spi display = SH1106Spi(5, 4); // for 1.3" OLED with SPI
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
// ========================================================= //
#endif

View File

@@ -10,6 +10,7 @@
| Display Driver | SSD1306 |
| Display SDA | GPIO 5 (D1) |
| Display SCL | GPIO 4 (D2) |
| Flip Display | NO |
| Button Up |GPIO 12 |
| Button Down | GPIO 13 |
| Button Left | disabled |

View File

@@ -76,6 +76,8 @@
SDA/MOSI = GPIO 13 (D7) */
//#define DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
//#define DISPLAY SH1106Spi display = SH1106Spi(5, 4); // for 1.3" OLED with SPI
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
// ========================================================= //
#endif

View File

@@ -10,6 +10,7 @@
| Display Driver | SH1106 |
| Display SDA | GPIO 5 (D1) |
| Display SCL | GPIO 4 (D2) |
| Flip Display | NO |
| Button Up |GPIO 12 |
| Button Down | GPIO 13 |
| Button Left | disabled |

View File

@@ -76,6 +76,8 @@
SDA/MOSI = GPIO 13 (D7) */
//#define DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
//#define DISPLAY SH1106Spi display = SH1106Spi(5, 4); // for 1.3" OLED with SPI
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
// ========================================================= //
#endif

View File

@@ -9,6 +9,7 @@
| Display Driver | SH1106 |
| Display SDA | GPIO 5 (D1) |
| Display SCL | GPIO 4 (D2) |
| Flip Display | No |
| Button Up |GPIO 12 |
| Button Down | GPIO 13 |
| Button Left | disabled |

View File

@@ -76,6 +76,8 @@
SDA/MOSI = GPIO 13 (D7) */
//#define DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
//#define DISPLAY SH1106Spi display = SH1106Spi(5, 4); // for 1.3" OLED with SPI
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
// ========================================================= //
#endif

View File

@@ -9,6 +9,7 @@
| Display Driver | SH1106 |
| Display SDA | GPIO 5 (D1) |
| Display SCL | GPIO 4 (D2) |
| Flip Display | NO |
| Button Up |GPIO 12 |
| Button Down | GPIO 13 |
| Button Left | disabled |

View File

@@ -76,6 +76,8 @@
SDA/MOSI = GPIO 13 (D7) */
//#define DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
//#define DISPLAY SH1106Spi display = SH1106Spi(5, 4); // for 1.3" OLED with SPI
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
// ========================================================= //
#endif

View File

@@ -12,6 +12,7 @@ The display can be enabled over the settings.
| Display Driver | SSD1306 |
| Display SDA | GPIO 5 (D1) |
| Display SCL | GPIO 4 (D2) |
| Flip Display | NO |
| Button Up |GPIO 14 (D5) |
| Button Down | GPIO 12 (D6) |
| Button Left | disabled |

View File

@@ -74,6 +74,8 @@
SDA/MOSI = GPIO 13 (D7) */
//#define DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
//#define DISPLAY SH1106Spi display = SH1106Spi(5, 4); // for 1.3" OLED with SPI
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
// ========================================================= //
#endif

View File

@@ -15,7 +15,9 @@ void DisplayUI::setupDisplay() {
*/
display.setFont(DejaVu_Sans_Mono_12);
display.setContrast(255);
#ifndef FLIP_DIPLAY
display.flipScreenVertically();
#endif
display.clear();
display.display();
// ====================== //