Neu im Shop: 12864B 128x64 LCD Matrix Display

 

 

How does a hobbyist congratulate his boss on his birthday?

 

Today, our new 128x64 Pixel Display 12864B To.

We want to do this with a AZ-Delivery Nano V3 and display a birthday greeting.

 

We connect the display as follows:

 

12864B

AZ-Delivery Nano V3

Gnd

Gnd

Vcc

5v

Case

D10

R/W

D11

E

D13

Psb

Gnd

Bla

5v

Blk

Gnd

 

Schematic

 

For programming we only use the widely used library U8glib.

 

/*
Pinout:
MODUL AZ-Delivery Nano V3
BLK GND
BLA +5V
PSB (SPI) GND
E (SCK) D13
R/W (MOSI) D11
RS (CS) D10
VCC +5V
GND GND


U8glib library copyright notice:

 Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
  
 Copyright (c) 2012, olikraus@gmail.com
 All rights reserved.
*/


/* Include U8glib */
#include "U8glib.h"

/* DEFINE SPI Pin */
#define CS_PIN 10

/* Initialize 12864 LCD to SPI mode */
U8GLIB_ST7920_128X64_1X u8g(CS_PIN);

Void Setup() 
{
}

/* My program */
Void Loop() 
{   /* Image structure */   u8g.firstPage();        /* Repeat to finished */   Thu    {     u8g.setFont(u8g_font_helvB08); Select font     u8g.drawStr( 26, 28, "Happy Birthday"); View text     u8g.setFont(u8g_font_fub14); Change font     u8g.drawStr( 22, 46, "Andreas!");     u8g.setFont(u8g_font_cursor); Choose Symbol-Schristart     u8g.drawStr( 12, 50, "X5e"); Heart1     u8g.drawStr( 16, 14, "X5f"); Heart2     u8g.drawStr( 110, 16, "X5e"); Heart3     u8g.drawStr( 114, 50, "X5f");  Heart4     u8g.drawFrame(4,4,123,60);  Frame1     u8g.drawFrame(2,2,123,60);  Frame2      }while(u8g.nextPage());
}

 

With the command u8g.setFont we select the font.

An overview of the available font sizes can be found at the developer at: https://github.com/olikraus/u8glib/wiki/fontsize

To display symbols, we use the font u8g_font_cursor

Based on the following table, you will find the appropriate character.

The hearts are in line 5 at position 15 and 16, so we use u8g.drawStr and output as characters .x5e and .x5f respectively.

 Happy birthday to you!

 

DisplaysFür arduinoProduktvorstellungen

3 comments

Diego Andres Martinez Martinez

Diego Andres Martinez Martinez

il codice non va. qualcuno mi lo puó pasare meglio grazie

Gerd Leonhard

Gerd Leonhard

Hallo, habt ihr für einen nodeMCU auch einen Verbindungplan, oder geht das mit dem nicht ?

free-x

free-x

Hallo,

wo könnte ich die Elemente ( NanoV3, ESP32 aus Ihrem Shop) für Fritzing finden

Gruß
free-x

Leave a comment

All comments are moderated before being published