#include <Arduino.h>
#include <U8g2lib.h>

U8G2_MAX7219_32X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE);

// 'matrix_display_counter', 32x8px
const unsigned char epd_bitmap_matrix_display_counter [] = {
	0x7e, 0x67, 0x75, 0x77, 0xef, 0x21, 0x15, 0x44, 0xe7, 0x21, 0x15, 0x44, 0xe3, 0x27, 0x77, 0x77, 
	0xe7, 0x24, 0x11, 0x15, 0xef, 0x24, 0x11, 0x15, 0x7e, 0x77, 0x71, 0x77, 0x00, 0x00, 0x00, 0x00
}; 

const unsigned char youtube_logo_bitmap [] = { // youtube bitmap logo, 8x7 px
  B01111110,
  B11101111,
  B11100111,
  B11100011,
  B11100111,
  B11101111,
  B01111110
}; 

byte digits[6] = {0, 0, 9, 9, 9, 8}; // individual digits to be displayed on the matrix display
byte digits_offset_perc[6] = {0, 0, 0, 0, 0, 0}; // y offset for the individual digits - percentage 0-100%
char digit_char[2]; // helper array for storing C-style string
char digit_char_next[2]; // helper array for storing C-style string

float y_offset; // y pixel offset for digit

void setup(void) {
  u8g2.begin();
  u8g2.enableUTF8Print();		// enable UTF8 support for the Arduino print() function
}

void loop(void) {
  /*
  u8g2.clearBuffer();					// clear the internal memory
  u8g2.setFont(u8g2_font_victoriabold8_8r);	// choose a suitable font
  u8g2.drawStr(0,7,"U8g2");			// write something to the internal memory
  u8g2.sendBuffer();					// transfer internal memory to the display
  delay(1000);  
*/

  String txt = "hello";
  u8g2.setFont(u8g2_font_unifont_t_greek );  // use chinese2 for all the glyphs of "你好世界"
  u8g2.clearBuffer();
  u8g2.setCursor(0, 8);
  //u8g2.drawUTF8(0,8,"ΑΒΓΔ");		// Chinese "Hello World"
  //u8g2.drawStr(0,7,"U8g2");
  u8g2.print("ΑΒΓ");
  u8g2.sendBuffer();
  
  delay(1000);
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
matrix1:V+
matrix1:GND
matrix1:DIN
matrix1:CS
matrix1:CLK
matrix1:V+.2
matrix1:GND.2
matrix1:DOUT
matrix1:CS.2
matrix1:CLK.2