1

Тема: GM12864-59N VER:2.0 ST7567S

http://forum.rcl-radio.ru/uploads/images/2022/09/175c3ae647e12f8535a1cb25015d2056.png
http://forum.rcl-radio.ru/uploads/images/2022/09/752253d8a97c3d943aa4fbd97437cb1c.png
http://forum.rcl-radio.ru/uploads/images/2022/09/61c999508ac729d8de48bc0ce97a313b.png
http://forum.rcl-radio.ru/uploads/images/2022/09/a1a4e58ebfe37cbea89094f4498501c8.png
http://forum.rcl-radio.ru/uploads/images/2022/09/4fec07da46a3c61fa02a3594a3ec08d6.png


/******************************
 * original code from
 * URL: https://github.com/mworkfun/ST7567A_128X32DOT_LCD
 * Modify for LCD ST7567S 128x64
 * URL: https://github.com/luetee/ST7567S_128X64_I2C.git
 ******************************/
#include <Wire.h>
#include<lcd_st7567s.h> // https://github.com/luetee/ST7567S_128X64_I2C

lcd_st7567s Lcd;

void setup() {
 Wire.begin();
 Lcd.Init();
}

void loop() {
 Lcd.testPixel(2); //use to test LCD screen. Parameter is velocity.
  
  for(int a=0; a<64; a++){
 Lcd.DisplayPixel(a,a); //display one pixel. X=0-31, Y=0-127
  delay(5);
  }
  for(int a=0; a<64; a++){
 Lcd.ClearPixel(a,a); //Does not display a pixel. X=0-31, Y=0-127
  delay(5);
  }

 Lcd.Clear(true);
  for(int a=0; a<64; a++){
 Lcd.ClearPixel(a,a); //Does not display a pixel. X=0-31, Y=0-127
  delay(5);
  }
  delay(1000);

 Lcd.Clear(false);
  for(int a=0; a<128; a++){
 Lcd.DisplayPixel(a,0); //display one pixel. X=0-31, Y=0-127
 Lcd.DisplayPixel(a,63); //display one pixel. X=0-31, Y=0-127
  }
  for(int a=0; a<64; a++){
 Lcd.DisplayPixel(0, a); //display one pixel. X=0-31, Y=0-127
 Lcd.DisplayPixel(127,a); //display one pixel. X=0-31, Y=0-127
 Lcd.DisplayPixel(4,a);
  }
 Lcd.DrawLine(5, 5, 125, 60, false);
 Lcd.DrawLine(125, 5, 5, 60, false);
 Lcd.DrawLine(53, 31, 73, 31, false);
 Lcd.DrawLine(63, 20, 63, 40, false);

 Lcd.draw_circle(20, 30, 10, DRAW_ALL, false, false);
 Lcd.draw_circle(20, 30, 15, DRAW_ALL, false, false);

 Lcd.draw_circle(105, 30, 15, DRAW_ALL, false, true);

  delay(1000);

 Lcd.Clear(false);
 Lcd.DrawLine(53, 31, 73, 31, false);
 Lcd.DrawLine(63, 20, 63, 40, false);
 Lcd.draw_circle(90, 30, 10, DRAW_ALL, false, false);
 Lcd.draw_circle(30, 30, 10, DRAW_ALL, false, true);
  delay(1000);

 Lcd.Clear(true);
 Lcd.DrawLine(53, 31, 73, 31, true);
 Lcd.DrawLine(63, 20, 63, 40, true);
 Lcd.draw_circle(90, 30, 10, DRAW_ALL, true, false);
 Lcd.draw_circle(30, 30, 10, DRAW_ALL, true, true);
  delay(1000);

/**/  
 Lcd.Cursor(7, 0); //Character display position. y=0-3, x=0-17
 Lcd.Display("KEYES"); 
 Lcd.Cursor(0, 1);
 Lcd.Display("ABCDEFGHIJKLMNOPQR");
 Lcd.Cursor(0, 2);
 Lcd.Display("123456789+-*/<>=$@");
 Lcd.Cursor(0, 3);
 Lcd.Display("%^&(){}:;'|?,.~\\[]");
 Lcd.Cursor(0, 4);
 Lcd.Display("ABCDEFGHIJKLMNOPQR");
  Lcd.Cursor(0, 5);
  Lcd.Display("123456789+-*/<>=$@");
  Lcd.Cursor(0, 6);
  Lcd.Display("%^&(){}:;'|?,.~\\[]");
  Lcd.Cursor(0, 7);
  Lcd.Display("ABCDEFGHIJKLMNOPQR");
  delay(1000);
  Lcd.Clear(false);
  Lcd.Cursor(0, 0);
  for(int i=0;i<100;i++){
    delay(100);
    String str = String(i);
    char cstr[16];
    str.toCharArray(cstr,16);
    Lcd.Display(cstr);
    }
  
  Lcd.Clear(false);                        //All pixels turn off.
  
  Lcd.DisplayPicture();               //Displays the image data for the picture.c file
  delay(1000);
}