Close

Testing Images on an ePaper Display

A project log for ELPH skin

A flexible and low-power electrophoretic (e-ink) display worn on the skin, like a temporary tattoo.

Hunter 05/12/2017 at 19:240 Comments

While I’m waiting for my display I bought a backup version to test some graphics on. It’s the Waveshare 4.3inch e-Paper kit and is equipped with an STM32F103ZET6 microcontroller, 128MB of Nand Flash memory and a UART interface. The resolution is 800x600 and sits on top of the circuit board. It’s also ridiculously easy to use and can be purchased online for around $50US.

Waveshare provided its own proprietary software but I opted to use this Arduino EPD library from sabas1080 on github to display bitmap images and draw some graphics onto the screen. The commands are as follows:


Startup & communication

epd_init() - initialize display (wakeup & reset)
epd_reset() - reset display
epd_wakeup() - wake up display
epd_handhshake() - establish connection
pd_set_baud() - set baud rate
epd_read_baud() - read baud rate
epd_set_memory() - Memory Mode: MEM_NAND or MEM_TF
epd_enter_stop_mode() - stop


Screen

epd_screen_rotation() - set screen rotation EPD_NORMAL or EPD_INVERSION
epd_clear() - clear screen by drawing all pixels black then white
epd_update() - refresh screen


Fonts

epd_load_font() - load font from memory
epd_set_en_font() - set English font
epd_set_ch_font() - set Chinese font
epd_set_color() - set font and background color (WHITE, GRAY, DARK_GRAY, BLACK)


Drawing

epd_draw_pixel() - draw a point at (x0, y0)
epd_draw_line() - draw a line starting at (x0, y0) ending at (x1, y1)
epd_fill_rect() - draw a filled rectangle starting at (x0, y0) ending at (x1, y1)
epd_draw_circle() - draw a circle with center at (x0, y0) and radius (r)
epd_fill_circle() - draw a filled circle with center at (x0, y0) and radius (r)
epd_draw_triangle() - draw a triangle with point 1 at (x0, y0), point 2 at (x1, y1) and point 3 at (x2, y2)
epd_fill_triangle() - draw a filled triangle with point 1 at (x0, y0), point 2 at (x1, y1) and point 3 at (x2, y2)
epd_disp_char() - display a character at (x0, y0)
epd_disp_string() - display a string starting at (x0, y0)


Images

epd_load_pic() - load image from memory
epd_disp_bitmap() - display bitmap image starting at (x0, y0)


Basic Program Structure

In setup() call:

  1. epd_init()
  2. epd_wakeup()
  3. epd_set_memory(mode)

In loop() call:

  1. epd_clear()
  2. code for whatever it is that you want to draw
  3. epd_update()
  4. delay(miliseconds)


Display
http://www.waveshare.com/4.3inch-e-paper.htm

Wiki
http://www.waveshare.com/wiki/4.3inch_e-Paper_Software

Waveshare user manual
http://www.waveshare.com/w/upload/7/71/4.3inch-e-Paper-UserManual.pdf

Software
http://www.waveshare.com/wiki/4.3inch_e-Paper

Waveshare Arduino library
https://github.com/sabas1080/LibraryEPD

Discussions