dot-matrix-lcd
A JavaScript plugin to emulate Dot Matrix LCD display.
Install
npm i -S dot-matrix-lcd
Import in HTML
<div id="lcd-container" class="lcd-container"></div>
<script src="./dist/index.js"></script>
This script exposes LCD
class on window
object.
Import in Node.js
const LCD = require('dot-matrix-lcd');
Plugin API
var lcd = new LCD({
elem: document.getElementById("lcd-container"),
rows: 2,
columns: 16,
pixelSize: 4,
pixelColor: "#000",
});
lcd.writeCharacter( { charCode, blockIndex } );
lcd.writeString({ string, offset });
lcd.clearCharacter({ blockIndex });
lcd.blinkCursor({ blockIndex, stop });
lcd.clearScreen();