A simple Tessel library for interacting with the Nokia 5110 display.
The module uses the double-wide proto-module and can be installed on either side of the Tessel. It occupies two ports but only uses one of them (A or D).
The module uses the Nokia 5110 display which can be easily acquired online. A few options are:
For connection information I followed the wiring guide from Sparkfun.
npm install tessel-nokia5110
var tessel = require('tessel');
// Screen is connected to port D
var nokia5110 = require('tessel-nokia5110').use(tessel.port['D']);
nokia5110.on('ready', function(){
nokia5110.clear(function(){
nokia5110.string("Hello Tessel!");
});
});
Nokia5110.on('ready', callback(err, screen)) - Emitted when the screen object is first initialized
Nokia5110.gotoXY(x,y,[callback(err)]) - Sets the active cursor location to (x,y)
Nokia5110.character(char, [callback(err)]) - Writes a single character to the display
Nokia5110.string(data, [callback(err)]) - Writes a string to the display
Nokia5110.bitmap(bitmapData, [callback(err)]) - Draws a monochrome bitmap from bitmapData
Nokia5110.clear([callback(err)]) - Clears the display
Nokia5110.setBacklight(state) - Turns the backlight on if state is truthy, off otherwise
- Bitmap Display. Demonstrates how to display a monochrome bitmap on the lcd.
Apache 2.0