Skip to content

A frustration-free library for working with all 24-pin eink panels

License

Notifications You must be signed in to change notification settings

bitbank2/bb_epaper

Repository files navigation

bb_epaper (BitBank epaper library)

Project started 9/11/2024
Copyright (c) 2024 BitBank Software, Inc.
Written by Larry Bank
[email protected]

What is it?
A frustration-free e-paper library suitable for Arduino, Linux, or random embedded systems with no OS.

Why did you write it?
I've always had an interest in graphics and displays. After experimenting with epaper, I looked around for code to control them. All I found was half-implemented demos and frustration. I wrote my own support for epaper panels into my OneBitDisplay library, but it made it a bit unwieldy. E-paper is in a class by itself, so I decided to create a unique library for working with these panels. The main goal was to reduce frustration and make an efficient set of functions that work with a large collection of panels in a consistent way.

What's special about it?
It's the first epaper library I've ever seen which can draw text and graphics without needing a local copy of the image data. There are some limitations to working that way, but it opens the possibility to control large displays on MCUs with nearly no memory. It also supports keeping a local copy of the graphics in RAM (the normal way to work with epaper). By offering both options, this library is unique.

Features:
---------

  • C API and C++ wrapper class with all of the usual graphics functions
  • Supports any bit depth of graphics (currently 2/3/7/16 color & grayscale)
  • Supports a large number of panels in a consistent way, without tons of repeated code
  • Supports any number of simultaneous displays of any type (mix and match)
  • Includes support for a unique compressed font and bitmap format
  • Includes command line tools to convert and compress TTF fonts and WinBMP files
  • Text cursor position with optional line wrap
  • A function to load a Windows BMP file
  • Optimized pixel pipeline customized for each supported bit depth

The compmressed font handling depends on my Group5 data compression library (included).
See the Wiki for help getting started
https://github.com/bitbank2/bb_epaper/wiki

A few words about fonts
-----------------------

The library includes 4 fixed fonts (6x8, 8x8, 16x16 and 12x16). The 16x16 and 12x16 are really a stretched+smoothed version of the 6x8 to save FLASH space. To use more elaborate fonts with more extensive character support, use my BB_FONT format compressed bitmap fonts. This functionality is part of my Group5 compression library.

Black & White (& Red)
------------------------
The current code supports 1-bit black and white epaper displays as well as the B/W/R models. At the time of this writing, the BWR models can only do a full refresh (no fast nor partial). This may change in a future version.

See WiKi and example code for how to use the library.

A unique feature of the library is that you can set the panel type at run-time. I created a testing tool which makes use of this feature (photo below). It allows you to run diagnostic tests on any of the supported panels and hot-swap them without restarting.
bb_epaper
In the photo below, the custom font and ellipse were drawn without using a local copy of the frame buffer (aka bufferless). bb_epaper offers some unique features like these when working on very constrained devices (insufficient RAM to hold a copy of the graphics).
bb_epaper

If you find this code useful, please consider sending a donation or becomming a Github sponsor.

paypal

About

A frustration-free library for working with all 24-pin eink panels

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages