eink

0.0.4 • Public • Published

Eink library

This small library is intended to allow sending commands to eink devices, although at the moment it only supports the Mira Display from Boox.

It uses the node-hid library to communicate with usb devices. On linux, you would have to either run as root to "write" to the usb device. Or add a new udev rule in (/etc/udev/rules.d/) with:

KERNEL=="hidraw*", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5020", GROUP="plugdev"

Doing a simple refresh, with dynamic import mode:

import('eink').then(({ Mira }) => {
  const device = new Mira.Display();
  device.sendCommand(Mira.Commands.refresh);
  device.close();
});

Or setting the warm light to max, with ES Modules

import { Mira } from 'eink';
const device = new Mira.Display();
device.sendCommand(Mira.Commands.setWarmLightLevel, 255);
device.close();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    5
  • 0.0.3
    1
  • 0.0.2
    2
  • 0.0.1
    1

Package Sidebar

Install

npm i eink

Weekly Downloads

1

Version

0.0.4

License

ISC

Unpacked Size

2.71 kB

Total Files

5

Last publish

Collaborators

  • osdroid