# Arduino-Memory-LCD-Driver
**Repository Path**: ImUpa/Arduino-Memory-LCD-Driver
## Basic Information
- **Project Name**: Arduino-Memory-LCD-Driver
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-04-23
- **Last Updated**: 2021-04-23
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Arduino driver for Sharp Memory LCD #
[Sharp's Memory LCD](https://www.sharpsma.com/products?sharpCategory=Memory%20LCD) is a lightweight display with 1-bit memory in every pixel allowing high-contrast, ultra-thin and at the time same delivering a relatively high frame rate (20Hz max) at merely microWatt power consumption level.

Driver compatible with ESP32 and Arduino M0 PRO listed in this repository. Although this driver has been developed for a dedicated [EVK](http://www.techtoys.com.hk/Sharp_MemoryLCD/EVK/Sharp%20Memory%20LCD%20Shield%20-%20User%20Guide-Update20181207.pdf), a simplified breakout board with few jumper wires are enough to test this library out.

# Folder structure : #
\MemoryLCD \picts \examples \BloodPressure_GUI \Energy \FirstPixel \HelloWorld \HelloWorld2 \src library.properties README.md (this file)Install this library to `/arduino libraries` folder. In Arduino IDE from File->Examples->Custom Libraries you will see 5 examples. We have tested 5 Memory LCD models up to time of writing:
#define LS027B7DH01 //#define LS032B7DD02 //#define LS044Q7DH01 //#define LS006B7DH03 //#define LS011B7DH03With this breakout board there are only few jumper cables required to finish the setup. Photos of ESP32 PICO Kit and Arduino M0 PRO as examples:
for (int x=0; x<8; x++) { if(x%2) GFXDisplayPutPixel(x,0,WHITE); else GFXDisplayPutPixel(x,0,BLACK); }What's happening in the for-loop is that, every time GFXDisplayPutPixel() is called for example GFXDisplayPutPixel(0,0,BLACK), it is the pixel position at (0,0) set BLACK with `framebuffer[0][0]=0b1111 1111 -> framebuffer[0][0]=0b0111 1111`. A pixel is set white with bit set `1` & clear to `0` to set black. After bitwise is finished with `GFXDisplayPutPixel_FB()`the line will be updated by the local function `GFXDisplayUpdateLine()`. Interested readers may take a look at the source code for GFXDisplayPutPixel() here:
void GFXDisplayPutPixel(uint16_t x, uint16_t y, COLOR color) { GFXDisplayPutPixel_FB(x, y, color); //where bitwise operation in framebuffer occurs GFXDisplayUpdateLine(y+1, (uint8_t *)&frameBuffer[y]); //update the line with SPI write }After running the for-loop above the LCD displays something this: 