AED 51.45
Description
The resolution of a graphical LCD is 128x64 pixels. It has 128 columns and 64-row segments with a blue background and 128x64 monochrome white pixels, ST7920 controller with 8192 16X16 dots fonts and 126 16X8 dots half-height alphanumerical fonts,6800 4-bit/8-bit parallel+3-wire serial spi interface, single led backlight with white color included that can be dimmed easily with a resistor or PWM,stn-blue LCD negative, wide operating temperature range, Ro A 3.3V or 5V power supply is available as an option.
It's easily controlled by MCU such as 8051, PIC, AVR, ARDUINO, ARM, and Raspberry Pi. It can be used in any embedded systems, industrial device, security, medical and hand-held equipment.
There are 20 pins in the display that are utilized for powering up the display, communication, contrast, and background LED lighting. However, there is another crucial link that is first obscured, and that is the choice between parallel and serial communication. The display controller supports both serial SPI and parallel connection.
you can read the Datasheet of the LCD 128x64 by Clicking Here.
to download the library of the 128x64 display please Click Here.
Once downloaded and installed in the Arduino development environment (IDE) it will be ready to be used in our sketch.
How to Connect the LCD 128x64 Display Blue Background with Arduino:
Just follow the next Schematic.
Arduino Code for the LCD 128x64 Display Blue Background:
#define LCDBACKLIGHT 33 #include "U8glib.h" U8GLIB_ST7920_128X64_1X u8g (7, 6,5, 4, 11, 10, 9, 8, 1, 3, 2); void setup () { // LCD BACKLIGHT initialization pinMode (LCDBACKLIGHT, OUTPUT); digitalWrite (LCDBACKLIGHT, HIGH); // turn on the backlight // call to U8g library u8g.firstPage (); do { draw (); } while (u8g.nextPage ()); } void loop () { u8g.firstPage (); do { draw (); } while (u8g.nextPage ()); } void draw (void) { int x; int y; int r, r1, r2; int angle = sensorWindDirectionValueDegrees - 90; // environment preparation u8g.setDefaultForegroundColor (); y = 10; // top line u8g.drawLine (15, y, 128, y); // battery voltage x = 86; y = 0; u8g.setPrintPos (x + 9, y); u8g.print (String (battery_Voltage)); // framework temperature x = 52; y = 0; u8g.setPrintPos (x + 9, y); u8g.print (String (sensorBaroTemperatura)); // drawing wind indicator and values u8g.setFont (u8g_font_6x12); u8g.setFontRefHeightExtendedText (); u8g.setFontPosTop (); r = 19; r1 = r - 2; r2 = r - 8; x = u8g.getWidth () - r - 1; y = r + 10; u8g.drawCircle (x, y, r); u8g.drawTriangle (cos ((angle * 71.0) /4068.0) * r1 + x, sin ((angle * 71.0) /4068.0) * r1 + y, cos (((angle-145.0) * 71.0) /4068.0) * r2 + x, sin (((angle-145.0) * 71.0) /4068.0) * r2 + y, cos (((angle + 145.0) * 71.0) /4068.0) * r2 + x, sin (((angle + 145.0) * 71.0) /4068.0) * r2 + y); u8g.setPrintPos (x - 21, r * 2 + 9); u8g.print (String (sensorWindDirectionValueDegrees) + (char) 176 + sensorWindDirectionDescription); u8g.setPrintPos (x - 39, r * 2 + 17); u8g.print (String (windSpeed1) + "km / h"); // calendar date and time u8g.setPrintPos (0.47); u8g.print (RTCDate); u8g.setPrintPos (0.55); u8g.print (RTCClock); // internal temperature display // HOME IN symbol x = 0; y = 10; u8g.setFont (u8g_font_6x13); u8g.setFontRefHeightExtendedText (); u8g.setFontPosTop (); u8g.setPrintPos (x, y); u8g.print (String (sensorTemperaturaK)); u8g.setPrintPos (x + 40, y); u8g.print (String (sensorUmiditaK)); u8g.setFont (u8g_font_6x12); u8g.setFontRefHeightExtendedText (); u8g.setFontPosTop (); u8g.setPrintPos (x + 24, y + 1); u8g.print (String (((char) 176)) + "C"); u8g.setPrintPos (x + 64, y + 1); u8g.print ( "% IN"); // external temperature display // HOME OUT symbol x = 0; y = 20; u8g.setFont (u8g_font_6x12); u8g.setFontRefHeightExtendedText (); u8g.setFontPosTop (); u8g.setPrintPos (x, y); u8g.print (String (sensorTemperaturaK2) + String (((char) 176)) + "C"); u8g.setPrintPos (x + 40, y); u8g.print (String (sensorUmiditaK2) + "% OUT"); u8g.setFont (u8g_font_6x12); u8g.setFontRefHeightExtendedText (); u8g.setFontPosTop (); y = 30; u8g.drawLine (0, y, 87, y); // pressure x = 0; y = 31; u8g.setPrintPos (x + 9, y); u8g.print (String (sensorBaroPressione)); // lux x = 0; y = 39; u8g.setPrintPos (x + 9, y); u8g.print (String (sensorLightLux)); }