Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Adafruit_GFX.h>
- #include <Adafruit_PCD8544.h>
- // pin 7 - Serial clock out (SCLK)
- // pin 6 - Serial data out (DIN)
- // pin 5 - Data/Command select (D/C)
- // pin 4 - LCD chip select (CS)
- // pin 3 - LCD reset (RST)
- Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
- static unsigned char PROGMEM sword38x38[] =
- {
- 0xFF, 0xF0, 0x00, 0x00, 0x00,
- 0xFF, 0xF0, 0x00, 0x00, 0x00,
- 0xC0, 0x0C, 0x00, 0x00, 0x00,
- 0xC0, 0x0C, 0x00, 0x00, 0x00,
- 0xC0, 0x03, 0x00, 0x00, 0x00,
- 0xC0, 0x03, 0x00, 0x00, 0x00,
- 0xC0, 0x03, 0x00, 0x00, 0x00,
- 0xC0, 0x03, 0x00, 0x00, 0x00,
- 0xC0, 0x00, 0xC0, 0x00, 0x00,
- 0xC0, 0x00, 0xC0, 0x00, 0x00,
- 0xC0, 0x00, 0x30, 0x00, 0x00,
- 0xC0, 0x00, 0x30, 0x00, 0x00,
- 0x30, 0x00, 0x30, 0x00, 0x00,
- 0x30, 0x00, 0x30, 0x00, 0x00,
- 0x0F, 0x00, 0x0C, 0x03, 0x00,
- 0x0F, 0x00, 0x0C, 0x03, 0x00,
- 0x00, 0xC0, 0x03, 0x0C, 0xC0,
- 0x00, 0xC0, 0x03, 0x0C, 0xC0,
- 0x00, 0x3C, 0x03, 0x0C, 0xC0,
- 0x00, 0x3C, 0x03, 0x0C, 0xC0,
- 0x00, 0x03, 0x00, 0xF3, 0x00,
- 0x00, 0x03, 0x00, 0xF3, 0x00,
- 0x00, 0x00, 0xF0, 0x33, 0x00,
- 0x00, 0x00, 0xF0, 0x33, 0x00,
- 0x00, 0x00, 0x0C, 0xCC, 0x00,
- 0x00, 0x00, 0x0C, 0xCC, 0x00,
- 0x00, 0x00, 0x0F, 0x33, 0x00,
- 0x00, 0x00, 0x0F, 0x33, 0x00,
- 0x00, 0x00, 0xF0, 0xC0, 0xC0,
- 0x00, 0x00, 0xF0, 0xC0, 0xC0,
- 0x00, 0x03, 0x0F, 0x30, 0xF0,
- 0x00, 0x03, 0x0F, 0x30, 0xF0,
- 0x00, 0x00, 0xF0, 0x0F, 0x0C,
- 0x00, 0x00, 0xF0, 0x0F, 0x0C,
- 0x00, 0x00, 0x00, 0x03, 0x0C,
- 0x00, 0x00, 0x00, 0x03, 0x0C,
- 0x00, 0x00, 0x00, 0x00, 0xF0,
- 0x00, 0x00, 0x00, 0x00, 0xF0
- };
- void setup() {
- display.begin();
- display.setContrast(60);
- display.setTextSize(2);
- }
- void loop() {
- display.clearDisplay();
- display.drawBitmap(23, 5, sword38x38, 38, 38, BLACK);
- display.display();
- delay(1000);
- display.clearDisplay();
- display.print(" Привет");
- display.println(" Habr");
- display.println(" \xab \xa4 \xbb");
- display.display();
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement