pitft
TypeScript icon, indicating that this package has built-in type declarations

0.0.17 • Public • Published

pitft

A NodeJS module for the Adafruit PiTFT family of displays for the Raspberry Pi computer.

With this module, you can draw lines, circles, rectangles, text and images to your Adafruit PiTFT from your NodeJS application. Includes double buffering support for flicker-free drawing. This module is only tested on the 2.8" PiTFT and the 2.2" PiTFT but should work on other displays from Adafruit.

Author

Contributors

- Peter Müller https://crycode.de/

Installation

To be able to use this module, the Adafruit PiTFT driver must be installed. I recommend following the installation guide for your particular device. I used the excellent DIY Installer script that Adafruit provides in the installation guide for my PiTFT device, and I guess it can be used for the other devices in the PiTFT family, too. Just remember to answer no when the question "Would you like the console to appear on the PiTFT display?" comes up.

You will also need to install the Cairo library. This can be done from the console on your Raspberry Pi:

$ sudo apt-get install libcairo2-dev

Finally, you can install the pitft module itself:

$ npm install pitft

Examples

Instead of writing a lot of documentation, I've written a few example programs. They can be found in the examples directory, and they cover all the functionality of the module.

Screenshots

berries.js

berries.js example

circles.js

circles.js example

clock.js

clock.js example

lines.js

lines.js example

rectangles.js

rectangles.js example

text.js

text.js example

pattern.js

pattern.js example

Package Sidebar

Install

npm i pitft

Weekly Downloads

9

Version

0.0.17

License

MIT

Unpacked Size

564 kB

Total Files

24

Last publish

Collaborators

  • vesteraas