Skip to content

Tessel library for interacting with the Nokia 5110 Graphic LCD

Notifications You must be signed in to change notification settings

1am/tessel-nokia5110

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nokia 5110 Graphic LCD

A simple Tessel library for interacting with the Nokia 5110 display.

Connection Information

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).

Hardware

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.

Installation

npm install tessel-nokia5110

Example

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!");
	});
});

Event

Nokia5110.on('ready', callback(err, screen)) - Emitted when the screen object is first initialized

Methods

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

Further Examples

  • Bitmap Display. Demonstrates how to display a monochrome bitmap on the lcd.

Licensing

Apache 2.0

About

Tessel library for interacting with the Nokia 5110 Graphic LCD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%