Skip to content

A C++ extension for node.js that gives javascript access to the PiTFT framebuffer

Notifications You must be signed in to change notification settings

vesteraas/node-pitft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 example

circles.js example

clock.js example

lines.js example

rectangles.js example

text.js example

pattern.js example

About

A C++ extension for node.js that gives javascript access to the PiTFT framebuffer

Resources

Stars

Watchers

Forks

Packages

No packages published