2016-06-27 02:50:12 +08:00
/*
FPS . ino
Frames Per Second : Display Performance Test
> > > Before compiling : Please remove comment from the constructor of the
> > > connected graphics display ( see below ) .
Universal 8 bit Graphics Library ( https : //github.com/olikraus/u8g2/)
Copyright ( c ) 2016 , olikraus @ gmail . com
All rights reserved .
Redistribution and use in source and binary forms , with or without modification ,
are permitted provided that the following conditions are met :
* Redistributions of source code must retain the above copyright notice , this list
of conditions and the following disclaimer .
* Redistributions in binary form must reproduce the above copyright notice , this
list of conditions and the following disclaimer in the documentation and / or other
materials provided with the distribution .
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES ,
INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ;
LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT ,
STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE )
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
= = = = = = = = = = = = = =
U8glib
ST7920_192X32 , SPI : FPS : Box = 7.6 @ = 9.8 iFPS : Box = 11.4 @ = 14.7
ST7920_192X32 , 8 Bit : FPS : Box = 6.2 @ = 7.5 iFPS : Box = 9.3 @ = 11.2
DOGM128 SW SPI : FPS : Box = 5.1 @ = 5.9 Pix = 2.6 iFPS : Box = 10.2 @ = 11.8 Pix = 5.2
DOGM128 HW SPI : FPS : Box = 5.5 @ = 6.3 iFPS : Box = 11.0 @ = 12.6
DOGXL160 SW SPI : FPS : Box = 1.7 @ = 1.9 iFPS : Box = 6.9 @ = 7.7
DOGXL160 HW SPI : FPS : Box = 1.8 @ = 2.1
NHD27OLED_BW , SW SPI : FPS : Box = 3.0 @ = 3.7
NHD27OLED_BW , HW SPI : FPS : Box = 3.5 @ = 4.5
NHD27OLED_2X_BW , SW SPI : FPS : Box = 3.8 @ = 4.9
NHD27OLED_2X_BW , HW SPI : FPS : Box = 4.6 @ = 6.4
30 Sep 2012
NHD27OLED_BW , SW SPI : FPS : Clip = 9.2 Box = 3.9 @ = 4.4 NEW_CODE
NHD27OLED_BW , SW SPI : FPS : Clip = 9.2 Box = 3.6 @ = 4.5
NHD27OLED_BW , HW SPI : FPS : Clip = 16.3 Box = 4.7 @ = 5.6
NHD27OLED_2X_BW , SW SPI : FPS : Clip = 9.7 Box = 4.5 @ = 5.8
NHD27OLED_2X_BW , SW SPI : FPS : Clip = 18.0 Box = 5.8 @ = 7.9
1 Oct 2012
ST7920_192X32 , 8 Bit : FPS : Box = 7.2 @ = 10.0
DOGM128 SW SPI : FPS : Box = 5.2 @ = 6.6 Pix = 2.6
DOGM128 HW SPI : FPS : Clip = 33.2 Box = 5.5 @ = 7.1
DOGXL160 SW SPI : FPS : Box = 1.7 @ = 2.0
DOGXL160 HW SPI : FPS : Box = 1.8 @ = 2.2
DOGXL160 GR SW SPI : FPS : Box = 1.1 @ = 1.3
1 Mar 2013
ST7920_192X32_1X , SPI : FPS : Clip = 10.3 Box = 5.5 @ = 7.2 Pix = 3.9
ST7920_192X32_4X , SPI : FPS : Clip = 10.9 Box = 6.7 @ = 8.8 Pix = 7.4
ST7920_192X32_1X , 8 Bit : FPS : Clip = 14.2 Box = 6.1 @ = 8.4 Pix = 4.2
ST7920_192X32_4X , 8 Bit : FPS : Clip = 14.2 Box = 7.8 @ = 10.7 Pix = 8.7
ST7920_192X32_1X , HW SPI : FPS : Clip = 14.2 Box = 6.3 @ = 8.7 Pix = 4.3
ST7920_192X32_4X , HW SPI : FPS : Clip = 15.3 Box = 8.0 @ = 11.2 Pix = 9.0
2 Jun 2013
U8GLIB_DOGM128 SW SPI : FPS : Clip = 23.9 Box = 4.5 @ = 6.6 Pix = 2.1
U8GLIB_DOGM128_2X SW SPI : FPS : Clip = 28.5 Box = 6.6 @ = 9.7 Pix = 3.9
U8GLIB_DOGM128_2X HW SPI : FPS : Clip = 40.8 Box = 7.1 @ = 10.8 Pix = 4.1
3 Jun 2013
U8GLIB_ST7920_192X32_1X - Os SW SPI FPS : Clip = 11.0 Box = 5.4 @ = 7.1 Pix = 3.9 Size = 11828
U8GLIB_ST7920_192X32_1X - O3 SW SPI FPS : Clip = 10.9 Box = 5.6 @ = 7.5 Pix = 4.0 Size = 13800
U8GLIB_ST7920_192X32_1X - Os SW SPI FPS : Clip = 16.8 Box = 6.7 @ = 9.6 Pix = 4.5 Size = 11858 ( new seq data output )
U8GLIB_ST7920_192X32_1X - Os HW SPI FPS : Clip = 25.7 Box = 7.5 @ = 11.3 Pix = 4.8 ( new seq data output )
6 Jun 2013
U8GLIB_DOGS102 u8g ( 13 , 11 , 10 , 9 ) ; STD SW SPI FPS : Clip = 9.5 Box = 7.6 @ = 8.2 Pix = 6.2 Size = 15652
U8GLIB_DOGS102 u8g ( 13 , 11 , 10 , 9 ) ; SW SPI FPS : Clip = 19.1 Box = 12.8 @ = 14.0 Pix = 9.2 Size = 15532
12 Jun 2013
SSD1351_128X128_332 SW SPI Clip = 1.3 Box = 0.7 @ = 0.9 Pix = 0.4
SSD1351_128X128_332 HW SPI Clip = 3.6 Box = 1.1 @ = 1.5 Pix = 0.5
24 Jun 2013
Uno SSD1351_128X128_332 SW SPI Clip = 1.4 Box = 0.8 @ = 0.9 Pix = 0.4
Uno SSD1351_128X128_332 HW SPI Clip = 4.4 Box = 1.2 @ = 1.6 Pix = 0.5
Uno SSD1351_128X128_HICOLOR HW SPI Clip = 3.7 Box = 0.8 @ = 1.0 Pix = 0.3
Mega2560 SSD1351_128X128_332 HW SPI Clip = 4.4 Box = 1.2 @ = 1.6 Pix = 0.5
Mega2560 SSD1351_128X128_4X_332 HW SPI Clip = 4.6 Box = 2.3 @ = 2.8 Pix = 1.5
Mega2560 SSD1351_128X128_HICOLOR HW SPI Clip = 3.6 Box = 0.8 @ = 1.0 Pix = 0.3
Mega2560 SSD1351_128X128_4X_HICOLOR HW SPI Clip = 4.2 Box = 1.7 @ = 2.1 Pix = 1.0
Due SSD1351_128X128_332 HW SPI Clip = 24.6 Box = 6.3 @ = 7.8 Pix = 2.8
Due SSD1351_128X128_4X_332 HW SPI Clip = 28.1 Box = 13.0 @ = 15.1 Pix = 8.5
Due SSD1351_128X128_HICOLOR HW SPI Clip = 20.8 Box = 3.4 @ = 4.5 Pix = 1.4
Due SSD1351_128X128_4X_HICOLOR HW SPI Clip = 26.3 Box = 8.9 @ = 11.1 Pix = 4.8
Due SSD1351_128X128_4X_HICOLOR SW SPI Clip = 0.4 Box = 0.4 @ = 0.4 Pix = 0.4
Due DOGS102 u8g ( 13 , 11 , 10 , 9 ) ; SW SPI FPS : Clip = 19.1 Box = 13.1 @ = 14.3 Pix = 9.4
Due DOGS102 u8g ( 10 , 9 ) ; HW SPI FPS : Clip = 128.9 Box = 30.7 @ = 40.6 Pix = 15.4
Due NHD27OLED_BW u8g ( 10 , 9 ) HW SPI FPS : Clip = 53.0 Box = 19.6 @ = 23.8 Pix = 10.6
Due NHD27OLED_2X_BW u8g ( 10 , 9 ) HW SPI FPS : Clip = 57.0 Box = 25.3 @ = 31.7 Pix = 18.1
Due NHD27OLED_GR u8g ( 10 , 9 ) HW SPI FPS : Clip = 34.1 Box = 11.7 @ = 13.7 Pix = 5.6
Due NHD27OLED_2X_GR u8g ( 10 , 9 ) HW SPI FPS : Clip = 38.1 Box = 15.5 @ = 20.0 Pix = 8.8
28. Apr 2016
Uno DOGS102 u8g ( 13 , 11 , 10 , 9 ) ; SW SPI FPS : Clip = 26.6 Box = 6.1 @ = 8.5 Pix = 2.8 11548 Bytes
Uno DOGS102 u8g ( 10 , 9 ) ; HW SPI FPS : Clip = 33.1 Box = 6.4 @ = 9.1 Pix = 2.9 11366 Bytes
= = = = = = = = = = = = = =
U8g2
28. Apr 2016
Uno DOGS102 u8g ( 13 , 11 , 10 , 9 ) ; SW SPI FPS : Clip = 3.0 Box = 3.3 @ = 2.1 Pix = 2.4 11472 Bytes
Uno DOGS102 u8g ( 10 , 9 ) ; HW SPI FPS : Clip = 24.5 Box = 87.4 @ = 5.0 Pix = 7.3 11554 Bytes
15. Mai 2016
Uno U8G2_UC1701_DOGS102_1_4W_SW_SPI SW SPI FPS : Clip = 3.5 Box = 3.8 @ = 2.3 Pix = 2.7 Arduino Flash Size : 13262 Bytes
Uno U8G2_UC1701_DOGS102_1_4W_HW_SPI HW SPI FPS : Clip = 26.3 Box = 90.5 @ = 5.1 Pix = 8.5 Arduino Flash Size : 13370 Bytes
Uno U8G2_UC1701_DOGS102_F_4W_HW_SPI HW SPI FPS : Clip = 50.6 Box = 119.6 @ = 9.4 Pix = 15.7 Arduino Flash Size : 13370 Bytes
16. Mai 2016 ( improved SW 4 - Wire SPI )
Uno U8G2_UC1701_DOGS102_1_4W_SW_SPI SW SPI FPS : Clip = 18.6 Box = 42.2 @ = 4.7 Pix = 7.7
24. Mai 2016
Uno U8G2_ST7565_DOGM128_1_4W_SW_SPI SW SPI FPS : Clip = 18.1 Box = 35.8 @ = 3.9 Pix = 6.2
Uno U8G2_ST7565_DOGM128_1_4W_HW_SPI HW SPI FPS : Clip = 25.4 Box = 78.7 @ = 4.2 Pix = 6.9
2018-11-19 04:54:22 +08:00
18. Nov 2018
Uno U8G2_ST7920_128X64_F_HW_SPI HW SPI 0.1 MHz FPS : Clip = 5.4 Box = 5.4 @ = 3.6 Pix = 4.2
Uno U8G2_ST7920_128X64_F_HW_SPI HW SPI 1.0 MHz FPS : Clip = 23.0 Box = 22.8 @ = 7.4 Pix = 10.4
Uno U8G2_ST7920_128X64_F_HW_SPI HW SPI 1.8 MHz FPS : Clip = 23.0 Box = 22.8 @ = 7.4 Pix = 10.4
Uno U8G2_ST7920_128X64_F_SW_SPI SW SPI FPS : Clip = 22.7 Box = 21.0 @ = 7.1 Pix = 9.6
Due U8G2_ST7920_128X64_F_SW_SPI SW SPI FPS : Clip = 3.3 Box = 3.2 @ = 3.1 Pix = 3.1
2018-12-21 03:14:45 +08:00
Due U8G2_ST7920_128X64_F_SW_SPI SW SPI FPS : Clip = 18.0 Box = 17.8 @ = 13.5 Pix = 14.6 Due optimized , 1000 ns
20 Dec 2018
Uno U8G2_SSD1306_128X64_NONAME_F_SW_I2C SW I2C FPS : Clip = 1.8 Box = 1.9 @ = 1.6 Pix = 1.7
Uno U8G2_SSD1306_128X64_NONAME_F_HW_I2C HW I2C FPS : Clip = 17.3 Box = 19.5 @ = 6.6 Pix = 8.8 old SSD13xx cad procedure
Uno U8G2_SSD1306_128X64_NONAME_F_HW_I2C HW I2C FPS : Clip = 18.0 Box = 20.3 @ = 6.6 Pix = 9.0 new SSD13xx cad procedure
Uno U8G2_SSD1306_128X64_NONAME_F_HW_I2C HW I2C FPS : Clip = 18.3 Box = 20.8 @ = 6.7 Pix = 9.1 new SSD13xx cad procedure ( lightning version )
2016-06-27 02:50:12 +08:00
*/
# include <Arduino.h>
# include <U8g2lib.h>
# ifdef U8X8_HAVE_HW_SPI
# include <SPI.h>
# endif
# ifdef U8X8_HAVE_HW_I2C
# include <Wire.h>
# endif
/*
2018-12-21 01:47:43 +08:00
U8g2lib Example Overview :
2016-06-27 02:50:12 +08:00
Frame Buffer Examples : clearBuffer / sendBuffer . Fast , but may not work with all Arduino boards because of RAM consumption
Page Buffer Examples : firstPage / nextPage . Less RAM usage , should work with all Arduino boards .
U8x8 Text Only Example : No RAM usage , direct communication with display controller . No graphics , 8 x8 Text only .
*/
// Please UNCOMMENT one of the contructor lines below
// U8g2 Contructor List (Frame Buffer)
// The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp
// Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected
2018-02-17 23:27:06 +08:00
//U8G2_NULL u8g2(U8G2_R0); // null device, a 8x8 pixel display which does nothing
2016-06-27 02:50:12 +08:00
//U8G2_SSD1306_128X64_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy (Production, Kickstarter Edition)
//U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_F_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8);
2020-01-28 02:22:59 +08:00
//U8G2_SSD1306_128X64_NONAME_F_3W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* reset=*/ 8);
2019-01-06 20:59:40 +08:00
//U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
2017-10-29 14:26:36 +08:00
//U8G2_SSD1306_128X64_ALT0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the "every 2nd line skipped" problem
2018-05-01 01:43:59 +08:00
//U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8);
2016-06-27 02:50:12 +08:00
//U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display
2017-10-07 05:38:01 +08:00
//U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 16, /* data=*/ 17, /* reset=*/ U8X8_PIN_NONE); // ESP32 Thing, pure SW emulated I2C
//U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ 16, /* data=*/ 17); // ESP32 Thing, HW I2C with pin remapping
2016-06-27 02:50:12 +08:00
//U8G2_SSD1306_128X64_NONAME_F_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_F_8080 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8);
2016-12-27 07:14:44 +08:00
//U8G2_SSD1306_128X64_VCOMH0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range
2017-10-29 14:16:03 +08:00
//U8G2_SSD1306_128X64_ALT0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the "every 2nd line skipped" problem
2016-08-20 16:24:36 +08:00
//U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-09-05 21:28:28 +08:00
//U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
2016-12-27 07:14:44 +08:00
//U8G2_SH1106_128X64_VCOMH0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range
2017-10-29 15:05:42 +08:00
//U8G2_SH1106_128X64_WINSTAR_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence
2020-12-26 18:33:34 +08:00
//U8G2_SH1106_128X32_VISIONOX_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
//U8G2_SH1106_128X32_VISIONOX_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-03-25 05:11:20 +08:00
//U8G2_SH1106_72X40_WISE_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-02-04 22:47:53 +08:00
//U8G2_SH1107_64X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SH1107_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SH1107_128X128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8);
2019-02-09 20:23:29 +08:00
//U8G2_SH1107_PIMORONI_128X128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8);
2019-04-22 17:14:47 +08:00
//U8G2_SH1107_SEEED_128X128_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);
//U8G2_SH1107_SEEED_128X128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
2018-02-04 22:47:53 +08:00
//U8G2_SH1107_SEEED_96X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-05-24 04:32:44 +08:00
//U8G2_SH1108_160X160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-04-14 05:23:42 +08:00
//U8G2_SH1122_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h
2016-06-27 02:50:12 +08:00
//U8G2_SSD1306_128X32_UNIVISION_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED
//U8G2_SSD1306_128X32_UNIVISION_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED
//U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED
2017-02-05 20:06:22 +08:00
//U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C
2019-02-09 21:27:24 +08:00
//U8G2_SSD1306_128X32_WINSTAR_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C
2016-11-21 01:18:14 +08:00
//U8G2_SSD1306_64X48_ER_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.66" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered
2018-02-27 05:12:19 +08:00
//U8G2_SSD1306_48X64_WINSTAR_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
2017-06-01 05:33:40 +08:00
//U8G2_SSD1306_64X32_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
2017-09-23 14:51:13 +08:00
//U8G2_SSD1306_64X32_1F_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
2017-07-09 15:07:14 +08:00
//U8G2_SSD1306_96X16_ER_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.69" OLED
2019-12-04 03:40:33 +08:00
//U8G2_SSD1306_72X40_ER_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.42" OLED
2021-03-07 18:31:19 +08:00
//U8G2_SSD1320_160X132_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1320_160X132_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-12-27 07:14:44 +08:00
//U8G2_SSD1322_NHD_256X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h
//U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h
2017-12-09 04:59:56 +08:00
//U8G2_SSD1322_NHD_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1322_NHD_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-12-27 07:14:44 +08:00
//U8G2_SSD1325_NHD_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1325_NHD_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-10-09 03:23:10 +08:00
//U8G2_SSD0323_OS128064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD0323_OS128064_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-10-28 22:57:15 +08:00
//U8G2_SSD1326_ER_256X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1
2017-01-05 18:06:07 +08:00
//U8G2_SSD1327_SEEED_96X96_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96
//U8G2_SSD1327_SEEED_96X96_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96
2018-06-23 02:15:37 +08:00
//U8G2_SSD1327_EA_W128128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1327_EA_W128128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1327_EA_W128128_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 5, /* data=*/ 4, /* reset=*/ U8X8_PIN_NONE);
2019-08-09 16:32:13 +08:00
//U8G2_SSD1327_EA_W128128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); /* Uno: A4=SDA, A5=SCL, add "u8g2.setBusClock(400000);" into setup() for speedup if possible */
2017-10-21 00:40:52 +08:00
//U8G2_SSD1327_MIDAS_128X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1327_MIDAS_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2019-08-09 16:32:13 +08:00
//U8G2_SSD1327_MIDAS_128X128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); /* Uno: A4=SDA, A5=SCL, add "u8g2.setBusClock(400000);" into setup() for speedup if possible */
2019-05-05 19:51:35 +08:00
//U8G2_SSD1327_WS_128X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1327_WS_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2020-01-14 23:52:51 +08:00
//U8G2_SSD1327_VISIONOX_128X96_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1327_VISIONOX_128X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-03-07 02:45:34 +08:00
//U8G2_SSD1329_128X96_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1329_128X96_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2021-06-04 23:00:24 +08:00
//U8G2_SSD1329_96X96_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1329_96X96_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2021-06-23 15:43:11 +08:00
//U8G2_SSD1329_96X96_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ A4, /* dc=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather 32u4 Basic Proto
2017-01-07 04:18:46 +08:00
//U8G2_SSD1305_128X32_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1305_128X32_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-10-17 02:55:25 +08:00
//U8G2_SSD1305_128X32_ADAFRUIT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1305_128X32_ADAFRUIT_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1305_128X64_ADAFRUIT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1305_128X64_ADAFRUIT_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2020-10-26 20:44:41 +08:00
//U8G2_SSD1305_128X64_RAYSTAR_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1305_128X64_RAYSTAR_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-04-09 17:28:03 +08:00
//U8G2_SSD1309_128X64_NONAME0_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1309_128X64_NONAME0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1309_128X64_NONAME2_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1309_128X64_NONAME2_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2019-06-12 22:44:05 +08:00
//U8G2_SSD1316_128X32_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1316_128X32_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2019-01-20 15:28:07 +08:00
//U8G2_SSD1317_96X96_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed
//U8G2_SSD1317_96X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed
//U8G2_SSD1318_128X96_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_SSD1318_128X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-06-27 02:50:12 +08:00
//U8G2_LD7032_60X32_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 9, /* dc=*/ 10, /* reset=*/ 8); // SW SPI Nano Board
//U8G2_LD7032_60X32_F_4W_SW_I2C u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* reset=*/ U8X8_PIN_NONE); // NOT TESTED!
2020-12-26 04:44:08 +08:00
//U8G2_LD7032_60X32_ALT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 9, /* dc=*/ 10, /* reset=*/ 8); // SW SPI Nano Board
//U8G2_LD7032_60X32_ALT_F_4W_SW_I2C u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* reset=*/ U8X8_PIN_NONE); // NOT TESTED!
2016-06-27 02:50:12 +08:00
//U8G2_UC1701_EA_DOGS102_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_UC1701_EA_DOGS102_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-12-17 04:59:40 +08:00
//U8G2_PCD8544_84X48_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display
//U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display
2017-01-02 00:23:01 +08:00
//U8G2_PCF8812_96X65_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814
//U8G2_PCF8812_96X65_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814
2018-02-02 22:24:33 +08:00
//U8G2_HX1230_96X68_F_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8);
//U8G2_HX1230_96X68_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-12-15 22:04:12 +08:00
//U8G2_KS0108_128X64_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low!
//U8G2_KS0108_ERM19264_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low!
2021-07-31 01:07:14 +08:00
//U8G2_HD44102_100X64_F u8g2(U8G2_R0, 4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low!
//U8G2_T7932_150X32_F u8g2(U8G2_R0, 4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low!
2016-06-27 02:50:12 +08:00
//U8G2_ST7920_192X32_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ U8X8_PIN_NONE, /*dc=*/ 17, /*reset=*/ U8X8_PIN_NONE);
//U8G2_ST7920_192X32_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE);
2016-11-26 05:50:11 +08:00
//U8G2_ST7920_128X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18 /* A4 */, /*cs=*/ U8X8_PIN_NONE, /*dc/rs=*/ 17 /* A3 */, /*reset=*/ 15 /* A1 */); // Remember to set R/W to 0
2016-06-27 02:50:12 +08:00
//U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE);
//U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10, /* reset=*/ 8);
2019-05-20 04:43:04 +08:00
//U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 14, /* data=*/ 13, /* CS=*/ 15, /* reset=*/ 16); // Feather HUZZAH ESP8266, E=clock=14, RW=data=13, RS=CS
2016-06-27 02:50:12 +08:00
//U8G2_ST7920_128X64_F_HW_SPI u8g2(U8G2_R0, /* CS=*/ 10, /* reset=*/ 8);
2019-05-20 04:43:04 +08:00
//U8G2_ST7920_128X64_F_HW_SPI u8g2(U8G2_R0, /* CS=*/ 15, /* reset=*/ 16); // Feather HUZZAH ESP8266, E=clock=14, RW=data=13, RS=CS
2020-10-28 22:37:48 +08:00
//U8G2_ST7528_ERC16064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7528_ERC16064_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-06-27 02:50:12 +08:00
//U8G2_ST7565_EA_DOGM128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7565_EA_DOGM128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-06-30 04:20:19 +08:00
//U8G2_ST7565_64128N_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7565_64128N_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-02-09 12:43:53 +08:00
//U8G2_ST7565_EA_DOGM132_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield
//U8G2_ST7565_EA_DOGM132_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield
2016-12-17 04:59:40 +08:00
//U8G2_ST7565_ZOLEN_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7565_ZOLEN_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-01-04 23:48:47 +08:00
//U8G2_ST7565_LM6059_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD
//U8G2_ST7565_LM6059_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD
2020-10-26 16:12:45 +08:00
//U8G2_ST7565_KS0713_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller
//U8G2_ST7565_KS0713_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller
2018-04-17 02:10:00 +08:00
//U8G2_ST7565_LX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7565_LX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-02-04 03:54:05 +08:00
//U8G2_ST7565_ERC12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7565_ERC12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2019-01-20 15:28:07 +08:00
//U8G2_ST7565_ERC12864_ALT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864
//U8G2_ST7565_ERC12864_ALT_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864
2016-06-27 02:50:12 +08:00
//U8G2_ST7565_NHD_C12832_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7565_NHD_C12832_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-02-09 12:43:53 +08:00
//U8G2_ST7565_NHD_C12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7565_NHD_C12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-04-14 22:27:46 +08:00
//U8G2_ST7565_JLX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7565_JLX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-01-03 00:09:15 +08:00
//U8G2_ST7567_PI_132X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6
//U8G2_ST7567_PI_132X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6
2017-09-22 02:10:26 +08:00
//U8G2_ST7567_JLX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_JLX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
2020-01-13 02:27:45 +08:00
//U8G2_ST7567_OS12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_OS12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
2018-05-19 15:22:56 +08:00
//U8G2_ST7567_ENH_DG128064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_ENH_DG128064_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_ENH_DG128064I_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_ENH_DG128064I_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-08-05 00:09:59 +08:00
//U8G2_ST7567_64X32_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
2020-04-18 18:35:02 +08:00
//U8G2_ST7567_HEM6432_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
2020-12-28 00:49:22 +08:00
//U8G2_ST7571_128X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7571_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2021-09-02 20:41:59 +08:00
//U8G2_ST7571_128X96_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7571_128X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2020-12-26 19:01:57 +08:00
//U8G2_ST7586S_ERC240160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7586S_YMC240160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-10-11 12:08:59 +08:00
//U8G2_ST75256_JLX172104_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST75256_JLX172104_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2019-01-25 05:57:27 +08:00
//U8G2_ST75256_JLX19296_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST75256_JLX19296_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-10-12 05:09:11 +08:00
//U8G2_ST75256_JLX256128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
//U8G2_ST75256_JLX256128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
2019-05-13 06:08:26 +08:00
//U8G2_ST75256_WO256X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
//U8G2_ST75256_WO256X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
2018-03-25 05:11:20 +08:00
//U8G2_ST75256_JLX256128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 9, /* data=*/ 8, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display
//U8G2_ST75256_JLX256128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display
2018-04-06 05:42:54 +08:00
//U8G2_ST75256_JLX256160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
//U8G2_ST75256_JLX256160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
2019-06-23 15:09:32 +08:00
//U8G2_ST75256_JLX256160M_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
//U8G2_ST75256_JLX256160M_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
//U8G2_ST75256_JLX256160_ALT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
//U8G2_ST75256_JLX256160_ALT_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
2018-04-01 06:54:08 +08:00
//U8G2_ST75256_JLX240160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST75256_JLX240160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-10-21 15:52:41 +08:00
//U8G2_ST75256_JLX25664_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, enable U8g2 16 bit mode for this display
2019-06-15 04:03:28 +08:00
//U8G2_ST75320_JLX320240_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
//U8G2_ST75320_JLX320240_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display
2017-01-04 23:48:47 +08:00
//U8G2_NT7534_TG12864R_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_NT7534_TG12864R_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2017-01-18 04:58:40 +08:00
//U8G2_ST7588_JLX12864_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5);
//U8G2_ST7588_JLX12864_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 5);
2017-01-11 05:35:39 +08:00
//U8G2_IST3020_ERC19264_F_6800 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND
//U8G2_IST3020_ERC19264_F_8080 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V
//U8G2_IST3020_ERC19264_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2019-09-22 15:03:18 +08:00
//U8G2_IST7920_128X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display
//U8G2_IST7920_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display
2016-12-31 19:14:17 +08:00
//U8G2_LC7981_160X80_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND
2017-03-27 01:43:12 +08:00
//U8G2_LC7981_160X160_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND
2017-02-14 06:18:41 +08:00
//U8G2_LC7981_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND
2018-06-23 14:10:36 +08:00
//U8G2_LC7981_240X64_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND
2017-08-12 02:01:18 +08:00
//U8G2_SED1520_122X32_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*dc=*/ A0, /*e1=*/ A3, /*e2=*/ A2, /* reset=*/ A4); // Set R/W to low!
2019-01-06 20:59:40 +08:00
//U8G2_T6963_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable/wr=*/ 17, /*cs/ce=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND
//U8G2_T6963_256X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable/wr=*/ 17, /*cs/ce=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND
//U8G2_T6963_160X80_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable/wr=*/ 17, /*cs/ce=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND
//U8G2_T6963_128X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable/wr=*/ 17, /*cs/ce=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND
//U8G2_T6963_128X64_ALT_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable/wr=*/ 17, /*cs/ce=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND
2016-08-13 01:19:59 +08:00
//U8G2_SED1330_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FG with GND
//U8G2_SED1330_240X128_F_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // A0 is dc pin!
2016-09-24 01:43:35 +08:00
//U8G2_RA8835_NHD_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0
//U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E
2021-05-25 04:21:35 +08:00
//U8G2_UC1601_128X32_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_UC1601_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-12-18 17:35:18 +08:00
//U8G2_UC1604_JLX19264_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_UC1604_JLX19264_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-11-23 05:08:19 +08:00
//U8G2_UC1608_ERC24064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup
2020-04-19 00:08:40 +08:00
//U8G2_UC1608_DEM240064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup
2017-08-15 03:04:49 +08:00
//U8G2_UC1608_ERC240120_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2016-12-07 05:51:15 +08:00
//U8G2_UC1608_240X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup
2016-10-15 23:08:04 +08:00
//U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE);
//U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE);
2016-11-13 04:02:15 +08:00
//U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board
2016-11-14 01:51:36 +08:00
//U8G2_UC1611_EA_DOGM240_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, DOGXL240 Test Board
2016-11-13 04:02:15 +08:00
//U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board
2016-11-14 01:24:27 +08:00
//U8G2_UC1611_EA_DOGXL240_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, DOGXL240 Test Board
2019-05-04 04:05:25 +08:00
//U8G2_UC1611_EW50850_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high
2019-05-05 19:51:35 +08:00
//U8G2_UC1611_CG160160_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // Connect WR1 and CD1 pin with 3.3V, connect CS0 with cs, WR0 with enable, CD with dc
2020-12-26 02:26:05 +08:00
//U8G2_UC1611_IDS4073_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16Bit Mode
//U8G2_UC1611_IDS4073_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16Bit Mode
2020-04-19 14:07:35 +08:00
//U8G2_UC1617_JLX128128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_UC1617_JLX128128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2021-06-20 18:10:06 +08:00
//U8G2_UC1638_192X96_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_UC1638_192X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2021-06-21 04:31:22 +08:00
//U8G2_UC1638_192X96_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); // u8g2 test board: I2C clock/data is same as SPI, , I2C default address is 0x78
2016-12-29 17:56:36 +08:00
//U8G2_SSD1606_172X72_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display
2017-09-09 17:07:33 +08:00
//U8G2_SSD1607_200X200_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists
2018-01-08 04:55:37 +08:00
//U8G2_SSD1607_GD_200X200_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display
2019-01-20 15:28:07 +08:00
//U8G2_SSD1607_WS_200X200_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Waveshare
2017-08-15 03:04:49 +08:00
//U8G2_IL3820_296X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // WaveShare 2.9 inch eInk/ePaper Display, enable 16 bit mode for this display!
2017-09-08 14:29:33 +08:00
//U8G2_IL3820_V2_296X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // ePaper Display, lesser flickering and faster speed, enable 16 bit mode for this display!
2018-10-09 03:23:10 +08:00
//U8G2_MAX7219_64X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE);
2018-06-14 03:50:48 +08:00
//U8G2_MAX7219_32X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE);
//U8G2_MAX7219_8X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE);
2018-08-11 22:22:10 +08:00
//U8G2_LS013B7DH03_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display
2020-12-26 05:02:12 +08:00
//U8G2_LS027B7DH01_400X240_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display, SPI Mode 2
//U8G2_LS027B7DH01_M0_400X240_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display, SPI Mode 0
2018-11-09 13:31:30 +08:00
//U8G2_LS013B7DH05_144X168_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display
2019-04-25 04:05:16 +08:00
//U8G2_ST7511_AVD_320X240_F_8080 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable/WR=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // Enable U8g2 16Bit Mode and connect RD pin with 3.3V/5V
2021-05-10 00:39:31 +08:00
//U8G2_S1D15721_240X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_S1D15721_240X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
2018-06-14 03:50:48 +08:00
2016-06-27 02:50:12 +08:00
// End of constructor list
typedef u8g2_uint_t u8g_uint_t ;
# define SECONDS 10
uint8_t flip_color = 0 ;
uint8_t draw_color = 1 ;
void draw_set_screen ( void ) {
// graphic commands to redraw the complete screen should be placed here
u8g2 . setColorIndex ( flip_color ) ;
u8g2 . drawBox ( 0 , 0 , u8g2 . getWidth ( ) , u8g2 . getHeight ( ) ) ;
}
void draw_clip_test ( void ) {
u8g_uint_t i , j , k ;
char buf [ 3 ] = " AB " ;
k = 0 ;
u8g2 . setColorIndex ( draw_color ) ;
u8g2 . setFont ( u8g2_font_6x10_tf ) ;
for ( i = 0 ; i < 6 ; i + + ) {
for ( j = 1 ; j < 8 ; j + + ) {
u8g2 . drawHLine ( i - 3 , k , j ) ;
u8g2 . drawHLine ( i - 3 + 10 , k , j ) ;
u8g2 . drawVLine ( k + 20 , i - 3 , j ) ;
u8g2 . drawVLine ( k + 20 , i - 3 + 10 , j ) ;
k + + ;
}
}
u8g2 . setFontDirection ( 0 ) ;
u8g2 . drawStr ( 0 - 3 , 50 , buf ) ;
u8g2 . setFontDirection ( 2 ) ;
u8g2 . drawStr ( 0 + 3 , 50 , buf ) ;
u8g2 . setFontDirection ( 0 ) ;
u8g2 . drawStr ( u8g2 . getWidth ( ) - 3 , 40 , buf ) ;
u8g2 . setFontDirection ( 2 ) ;
u8g2 . drawStr ( u8g2 . getWidth ( ) + 3 , 40 , buf ) ;
u8g2 . setFontDirection ( 1 ) ;
u8g2 . drawStr ( u8g2 . getWidth ( ) - 10 , 0 - 3 , buf ) ;
u8g2 . setFontDirection ( 3 ) ;
u8g2 . drawStr ( u8g2 . getWidth ( ) - 10 , 3 , buf ) ;
u8g2 . setFontDirection ( 1 ) ;
u8g2 . drawStr ( u8g2 . getWidth ( ) - 20 , u8g2 . getHeight ( ) - 3 , buf ) ;
u8g2 . setFontDirection ( 3 ) ;
u8g2 . drawStr ( u8g2 . getWidth ( ) - 20 , u8g2 . getHeight ( ) + 3 , buf ) ;
u8g2 . setFontDirection ( 0 ) ;
}
void draw_char ( void ) {
char buf [ 2 ] = " @ " ;
u8g_uint_t i , j ;
// graphic commands to redraw the complete screen should be placed here
u8g2 . setColorIndex ( draw_color ) ;
u8g2 . setFont ( u8g2_font_6x10_tf ) ;
j = 8 ;
for ( ; ; ) {
i = 0 ;
for ( ; ; ) {
u8g2 . drawStr ( i , j , buf ) ;
i + = 8 ;
if ( i > u8g2 . getWidth ( ) )
break ;
}
j + = 8 ;
if ( j > u8g2 . getHeight ( ) )
break ;
}
}
void draw_pixel ( void ) {
u8g_uint_t x , y , w2 , h2 ;
u8g2 . setColorIndex ( draw_color ) ;
w2 = u8g2 . getWidth ( ) ;
h2 = u8g2 . getHeight ( ) ;
w2 / = 2 ;
h2 / = 2 ;
for ( y = 0 ; y < h2 ; y + + ) {
for ( x = 0 ; x < w2 ; x + + ) {
if ( ( x + y ) & 1 ) {
u8g2 . drawPixel ( x , y ) ;
u8g2 . drawPixel ( x , y + h2 ) ;
u8g2 . drawPixel ( x + w2 , y ) ;
u8g2 . drawPixel ( x + w2 , y + h2 ) ;
}
}
}
}
2018-04-28 14:42:48 +08:00
void draw_line ( void ) {
u8g2 . setColorIndex ( draw_color ) ;
u8g2 . drawLine ( 0 , 0 , u8g2 . getWidth ( ) - 1 , u8g2 . getHeight ( ) - 1 ) ;
}
2016-06-27 02:50:12 +08:00
// returns unadjusted FPS
uint16_t execute_with_fps ( void ( * draw_fn ) ( void ) ) {
uint16_t FPS10 = 0 ;
uint32_t time ;
time = millis ( ) + SECONDS * 1000 ;
// picture loop
do {
u8g2 . clearBuffer ( ) ;
draw_fn ( ) ;
u8g2 . sendBuffer ( ) ;
FPS10 + + ;
flip_color = flip_color ^ 1 ;
} while ( millis ( ) < time ) ;
return FPS10 ;
}
const char * convert_FPS ( uint16_t fps ) {
static char buf [ 6 ] ;
strcpy ( buf , u8g2_u8toa ( ( uint8_t ) ( fps / 10 ) , 3 ) ) ;
buf [ 3 ] = ' . ' ;
buf [ 4 ] = ( fps % 10 ) + ' 0 ' ;
buf [ 5 ] = ' \0 ' ;
return buf ;
}
void show_result ( const char * s , uint16_t fps ) {
// assign default color value
u8g2 . setColorIndex ( draw_color ) ;
u8g2 . setFont ( u8g2_font_8x13B_tf ) ;
2019-02-22 23:39:23 +08:00
u8g2 . clearBuffer ( ) ;
u8g2 . drawStr ( 0 , 12 , s ) ;
u8g2 . drawStr ( 0 , 24 , convert_FPS ( fps ) ) ;
u8g2 . sendBuffer ( ) ;
2016-06-27 02:50:12 +08:00
}
void setup ( void ) {
2018-04-28 14:42:48 +08:00
/* U8g2 Project: SSD1306 Test Board */
2018-05-01 01:43:59 +08:00
//pinMode(10, OUTPUT);
//pinMode(9, OUTPUT);
//digitalWrite(10, 0);
//digitalWrite(9, 0);
2018-04-28 14:42:48 +08:00
/* U8g2 Project: T6963 Test Board */
//pinMode(18, OUTPUT);
//digitalWrite(18, 1);
/* U8g2 Project: KS0108 Test Board */
//pinMode(16, OUTPUT);
//digitalWrite(16, 0);
/* U8g2 Project: LC7981 Test Board, connect RW to GND */
//pinMode(17, OUTPUT);
//digitalWrite(17, 0);
2016-06-27 02:50:12 +08:00
u8g2 . begin ( ) ;
// flip screen, if required
// u8g2.setRot180();
// assign default color value
draw_color = 1 ; // pixel on
2018-11-19 04:54:22 +08:00
//u8g2.setBusClock(2000000);
2016-06-27 02:50:12 +08:00
}
void loop ( void ) {
uint16_t fps ;
fps = execute_with_fps ( draw_clip_test ) ;
show_result ( " draw clip test " , fps ) ;
delay ( 5000 ) ;
fps = execute_with_fps ( draw_set_screen ) ;
show_result ( " clear screen " , fps ) ;
delay ( 5000 ) ;
fps = execute_with_fps ( draw_char ) ;
show_result ( " draw @ " , fps ) ;
delay ( 5000 ) ;
fps = execute_with_fps ( draw_pixel ) ;
show_result ( " draw pixel " , fps ) ;
delay ( 5000 ) ;
2018-04-28 14:42:48 +08:00
fps = execute_with_fps ( draw_line ) ;
show_result ( " draw line " , fps ) ;
delay ( 5000 ) ;
2016-06-27 02:50:12 +08:00
}