node module for the 7.5 inch waveshare epaper display
npm install epd7x5sudo raspi-config
sudo apt-get install libgd2-dev # libgd
npm install epd7x5
javascript
const epd7x5 = require('epd7x5');
//init the module
epd7x5.init();
//get a gd image of 640 x 384 Pixels for drawing
var img = epd7x5.getImageBuffer() ;
//load some fonts
let font = '/home/pi/epd_test/ARIAL.TTF';
//draw content with node-gd functions
img.stringFT(epd7x5.black, font, 64, -0.0, 5, 100, 'Hello EPD 7x5!');
img.stringFT(epd7x5.red, font, 64, -0.0, 5, 200, 'Hello EPD 7x5!');
img.filledRectangle(0, 220, 640, 310, epd7x5.red)
img.stringFT(epd7x5.white, font, 64, -0.0, 5, 300, 'Hello EPD 7x5!');
//send the image for display
epd7x5.displayImageBuffer(img);
`
The module exports the following functions and constants:
$3
epd7x5.init()
epd7x5.getImageBuffer()
epd7x5.displayImageBuffer(img)
$3
epd7x5.white
epd7x5.red
epd7x5.black
epd7x5.width
epd7x5.height
$3
epd7x5.gd
example: epd7x5.gd.createFromFile(path)` to open an image