New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dot-matrix-lcd

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dot-matrix-lcd

A simple Dot Matrix LCD emulator for JavaScript.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-13.33%
Maintainers
1
Weekly downloads
 
Created
Source

dot-matrix-lcd

A JavaScript plugin to emulate Dot Matrix LCD display.

Install

npm i -S dot-matrix-lcd

Import in HTML

<!-- LCD Display Container -->
<div id="lcd-container" class="lcd-container"></div>

<!-- Plugin Script -->
<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, // number of character rows on the LCD screen
    columns: 16, // number of character columns on the LCD screen
    pixelSize: 4, // size of each pixel
    pixelColor: "#000", // color of the pixel
});

// Write a character on LCD screen.
// charCode => decimal number or hexadecimal string ASCII code point
// blockIndex => index of the character block (default: 0)
lcd.writeCharacter( { charCode, blockIndex } );

// Write string (text) on LCD screen.
// string => text (default: "")
// offset => offset index from the start of the screen.
lcd.writeString({ string, offset });
    
// Clear a character at a given index on the LCD screen.
// blockIndex => Index of the character block (default: 0)
lcd.clearCharacter({ blockIndex });

// Toggle cursor blink at the given character block.
// blockIndex => index of the character block (default: 0)
// stop => stop cursor blink (default: false)
lcd.blinkCursor({ blockIndex, stop });

// Clear entire LCD screen.
lcd.clearScreen();

FAQs

Package last updated on 10 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc