This is the E-Ink / Paper display device integrated by the image display technology of Microencapsulated Electrophoretic Display (MED). This device has an approach to create a tiny spheres in which the charge color pigments are suspending the transparent electrode layer that moves depending on the electronic charge. The screen display patterns by reflecting the ambient light and no background light needed it is more clearer under the sunlight. This device is ideal choice application such as shelf label, industrial instruments, home and appliances, automotive, mobile devices such as E-Paper, E-Book, E-Reader and Smart Watch. The data communication of this device is using 3 wire, 4 wire SPI Serial Peripheral Interface that runs on 3.3v and generates 4 color, black, white, grey, and red.
Required Components
- Arduino Microcontroller, NodeMCU, Teensy Board, TeensyDuino, ESP8266 12, 12E, ESP8266 NodeMCU, ESPDuino, ATMEGA328 16/12, ATMEGA32u4 16/8/ MHz, ESP8266, ATMEGA250 16 MHz, ATSAM3x8E, ATSAM21D, Raspberry Pi, STM32 (Note: The Diagram below is using NANO. (please refer to the respective pin-outs)
- E-Ink / E-Paper 1.5 Inch A, 1.5 Inch B, 2.13 Inch A, 2.13 Inch B, 2.9 Inch A, 2.9 Inch B, 4.2 Inch A, 4.2 Inch B, 7.5 Inch A, 7.5 Inch B.
- 2.7 inch A and 2.7 B is for Raspberry Hat.
- Jumper Wires / DuPont Wires
- Solder Less Bread Board (Optional)
Wiring Guide
For bitmap c array generator and step by step guide how to use the software please refer to this link.
Source Code
This a test code for 1.54 inch & 2.9 Inch E-Ink / E-Paper display panel.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
#include <SPI.h> #include <epd1in54.h> #include <epdpaint.h> #include "imagedata.h" // Image Data #define COLORED 0 #define UNCOLORED 1 unsigned char image[1024]; Paint paint(image, 0, 0); // width should be the multiple of 8 Epd epd; unsigned long time_start_ms; unsigned long time_now_s; void setup() { Serial.begin(9600); if (epd.Init(lut_full_update) != 0) { Serial.print("14CORE | E-Paper Initialization Failed "); delay(1000); Serial.print("Check wiring ..........................") return; } /** * there are 2 memory areas embedded in the e-paper display * and once the display is refreshed, the memory area will be auto-toggled, * i.e. the next action of SetFrameMemory will set the other memory area * therefore you have to clear the frame memory twice. */ epd.ClearFrameMemory(0xFF); // bit set = white, bit reset = black epd.DisplayFrame(); epd.ClearFrameMemory(0xFF); // bit set = white, bit reset = black epd.DisplayFrame(); paint.SetRotate(ROTATE_0); /* ------- Change this if your using other sizes of EPaper --------*/ //paint.SetWidth(129); // Uncommetn if your using 2.9 E-Ink Display //paint.SetWidth(24); // Uncommetn if your using 2.9 E-Ink Display paint.SetWidth(200); //Comment if your using 2.9 inch paint.SetHeight(24); //COmment if your using 2.9 inch /* ----- Numerical Coordinates > 2.9 Inch Un-comment -------- */ // paint.Clear(COLORED); // paint.DrawStringAt(0, 4, "14CORE | TEST CODE", &Font16, UNCOLORED); // epd.SetFrameMemory(paint.GetImage(), 0, 10, paint.GetWidth(), paint.GetHeight()); //paint.Clear(UNCOLORED);paint.DrawStringAt(0, 4, "EPAPER 2.9 Inch DEMO", &Font16, COLORED); //epd.SetFr //ameMemory(paint.GetImage(), 0, 30, paint.GetWidth(), paint.GetHeight()); /* ------------------------------------------------------------- */ /* -------------- Numerical Coordinates > 1.54 Inch ------------ */ paint.Clear(COLORED); paint.DrawStringAt(30, 4, "14CORE | TEST CODE", &Font16, UNCOLORED); epd.SetFrameMemory(paint.GetImage(), 0, 10, paint.GetWidth(), paint.GetHeight()); paint.Clear(UNCOLORED); paint.DrawStringAt(30, 4, "EPAPER 1.5 Inch DEMO", &Font16, COLORED); epd.SetFrameMemory(paint.GetImage(), 0, 30, paint.GetWidth(), paint.GetHeight()); /* ---------------------------------------------------------- */ paint.SetWidth(64); paint.SetHeight(64); paint.Clear(UNCOLORED); paint.DrawRectangle(0, 0, 40, 50, COLORED); paint.DrawLine(0, 0, 40, 50, COLORED); paint.DrawLine(40, 0, 0, 50, COLORED); epd.SetFrameMemory(paint.GetImage(), 16, 60, paint.GetWidth(), paint.GetHeight()); paint.Clear(UNCOLORED); paint.DrawCircle(32, 32, 30, COLORED); epd.SetFrameMemory(paint.GetImage(), 120, 60, paint.GetWidth(), paint.GetHeight()); paint.Clear(UNCOLORED); paint.DrawFilledRectangle(0, 0, 40, 50, COLORED); epd.SetFrameMemory(paint.GetImage(), 16, 130, paint.GetWidth(), paint.GetHeight()); paint.Clear(UNCOLORED); paint.DrawFilledCircle(32, 32, 30, COLORED); epd.SetFrameMemory(paint.GetImage(), 120, 130, paint.GetWidth(), paint.GetHeight()); epd.DisplayFrame(); delay(2000); if (epd.Init(lut_partial_update) != 0) { Serial.print("e-Paper init failed"); return; } /** * there are 2 memory areas embedded in the e-paper display and once the display is refreshed, the memory area will be auto-toggled, i.e. the next action of SetFrameMemory will set the other memory area therefore you have to set the frame memory and refresh the display twice. */ epd.SetFrameMemory(IMAGE_DATA); epd.DisplayFrame(); epd.SetFrameMemory(IMAGE_DATA); epd.DisplayFrame(); time_start_ms = millis(); } void loop() { // put your main code here, to run repeatedly: time_now_s = (millis() - time_start_ms) / 1000; char time_string[] = {'0', '0', ':', '0', '0', '\0'}; time_string[0] = time_now_s / 60 / 10 + '0'; time_string[1] = time_now_s / 60 % 10 + '0'; time_string[3] = time_now_s % 60 / 10 + '0'; time_string[4] = time_now_s % 60 % 10 + '0'; paint.SetWidth(32); paint.SetHeight(96); paint.SetRotate(ROTATE_270); paint.Clear(UNCOLORED); paint.DrawStringAt(0, 4, time_string, &Font24, COLORED); epd.SetFrameMemory(paint.GetImage(), 80, 72, paint.GetWidth(), paint.GetHeight()); epd.DisplayFrame(); delay(500); } |
E-Ink / E-Paper Sample Codes & Libraries
1.5 Inch Model A | 1.5 Inch Model B | 2.9 Inch Model A | 2.9 Inch Model B
4.2 Inch Model A | 4.2 Inch Model B | 7.5 Inch Model A | 7.5 Inch Model B
Downlaod Image2LCD | Here
Downloads
- 1.5 Inch Datasheet | Model A | Model B
- 1.5 Inch Schematics | Model A | Model B
- 2.9 Inch Datasheet | Model A | Model B
- 2.9 Inch Schematics | Model A | Model B
- 4.2 Inch Datasheet | Model A | Model B
- 4.2 Inch Schematics | Model A | Model B
- 7.5 Inch Datasheet | Model A | Model B
- 7.5 Inch Schematics | Model A | Model B
Pingback:LuminOx O2 / Oxygen UART Optical Sensor Arduino | 14Core.com