• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🔮 A simple HTML5 LED Matrix Simulator for fun

LED Matrix Simulator

I was too impatient for my Adafruit 32x16 LED Matrix display to arrive, so I made one using HTML5 Canvas.

⚠️ Note that this is an untested project meant for fun and learning, it's not meant to be used in production.

📍 See in in action here

Technologies used:

  • Typescript
  • Preact
  • HTML5 Canvas

Bitmap fonts

Microcontrollers need special bitmap fonts to display text or digits on Crystal or LED Matrix displays. These fonts are usually represented in an array of arrays of hexadecimal bytes. Something like this:

const unsigned char font[96][6] = {
  {0x00,0x00,0x00,0x00,0x00,0x00}, //  
  {0x2f,0x00,0x00,0x00,0x00,0x00}, // !
  {0x03,0x00,0x03,0x00,0x00,0x00}, // "
        ...

This array contains 96 characters (each character 6 bytes) ordered by their character code in Unicode table. So for example space is index 0, ! is index 1 and so on. So to find the character's index, we need to subtract 32 from it's characrer code. Each character in this font map is an array of 6 bytes, and each byte represents a column on the external display:

{0x3C,0x12,0x12,0x12,0x3E,0x00}, // A

To turn this into pixel data, each hex item needs to be converted to binary. This can be done easily in Javascript:

0x12.toString(2); // 00010010

From here it get's easy. 00010010 is a column on the display, and six of those form a letter. Read more about these fonts.

Related

LICENSE

Released under the MIT License.

Adafruit Plasma Example

The original code for the Plasma example is copied over from the Adafruit RGB Matrix panel library examples directory.

Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon for Adafruit Industries.  
BSD license, all text above must be included in any redistribution

More Repositories

1

github-contributions-chart

:octocat: Generate an image of all your Github contributions
JavaScript
5,189
star
2

mac-local-rtmp-server

Local RTMP Streaming Server
JavaScript
525
star
3

stringz

💯 Super fast unicode-aware string manipulation Javascript library
TypeScript
237
star
4

github-contributions-api

:octocat: Github contributions API (bootleg)
JavaScript
203
star
5

github-contributions-canvas

A tool for drawing a heat-map of Github contributions on HTML Canvas
TypeScript
180
star
6

jDateTime

[UNMAINTAINED] Jalali DateTime Class for PHP
PHP
180
star
7

vscode-duotone-dark

DuoTone Dark Sea Syntax theme for Visual Studio Code
JavaScript
84
star
8

SVGDraw

Simple SVG Drawing with Backbone, RequireJS & Snap.svg
JavaScript
56
star
9

serialgraphy

7-Days TV Shows airtime guide. Using CSS3 and AngularJS.
JavaScript
53
star
10

persianParser

A javascript library to convert persian text for using on iOS/Android browsers.
JavaScript
36
star
11

dropbox-fs

📦 Node FS wrapper for Dropbox
JavaScript
35
star
12

rpi-matrix

A simple RaspberryPi clock and browser simulator
TypeScript
32
star
13

country-tools

🇪🇺 A simple NodeJS helper for getting information about countries of the world.
TypeScript
31
star
14

lunchify-swift

🍴 10€ Lunch Buffet Guide in Finland
Swift
30
star
15

matrix-display-store

Tools for creating Led Matrix content
TypeScript
28
star
16

top-tweets

A simple Node.js app to retweet top tweets on Twitter
JavaScript
26
star
17

laravel-jdate

A Laravel Bundle to help working with Jalali (Shamsi) Dates
PHP
26
star
18

about

👨 About Me - A summary of who I am, what I like and what I work on.
21
star
19

led-matrix

An HTML5 Canvas LED Matrix Simulator
TypeScript
19
star
20

promise-arrays

A set of tools for working with arrays in an async manner
JavaScript
17
star
21

vscode-json-to-js-object

VSCode extension for converting JSON objects to JavaScript objects
TypeScript
16
star
22

booksy-app

TypeScript
15
star
23

node-mac-app-icon

Get App icons by pid on macOS in NodeJS
JavaScript
12
star
24

sqs-parallel

Simple NodeJS wrapper for AWS SQS with concurrency support
TypeScript
12
star
25

typescript-api-starter

A simple functional typescript API starter
TypeScript
10
star
26

rwd-conf-92

Website for 1st Responsive Design Conference in Iran.
CSS
9
star
27

GetAppIcon

Get App icons by pid on macOS
Swift
8
star
28

booksy-api

Booksy API
TypeScript
8
star
29

farsi-blog

JavaScript
8
star
30

gatsby-plugin-css-modules-typings

A Gatsby plugin that provides typings for css modules
JavaScript
7
star
31

styled-flexbox

JavaScript
7
star
32

lunchify-react-native

JavaScript
6
star
33

lunchify-scraper

JavaScript
6
star
34

unicode-astral-regex

A regex to match astral symbols that supports unicode strings.
JavaScript
5
star
35

lunchify-api

JavaScript
5
star
36

buttercup-desktop

JavaScript
5
star
37

ng-game-of-life

Game of Life written in Rust, UI in Angular
TypeScript
5
star
38

dotfiles

My ~/.dotfiles
Shell
3
star
39

lunchify-cordova

JavaScript
3
star
40

github-contribs-canvas-playground

Created with CodeSandbox
JavaScript
2
star
41

secure-dev-server

Development proxy server with SSL support
JavaScript
2
star
42

booksy-app-backup

TypeScript
2
star
43

rpi-matrix-homekit

HomeKit Integration for Rpi Matrix Project
JavaScript
2
star
44

homebridge-nibe

TypeScript
2
star
45

sms-collection-convert

JavaScript
2
star
46

keyboard-designer

JavaScript
2
star
47

game-of-life

Conway's Game of Life in Rust
JavaScript
1
star
48

lunchify

Venues for lunch around Keilaniemi
HTML
1
star
49

react-native-week-strip

TypeScript
1
star
50

wlf

CSS
1
star
51

firebase-explorer

TypeScript
1
star
52

sallar

1
star
53

kurdishtap

Swift
1
star
54

rn-stacks

TypeScript
1
star
55

check-os-tray-support

Check if the current OS supports showing Tray (useful for Electron apps)
JavaScript
1
star
56

rpi-matrix-pwa

JavaScript
1
star
57

js-pong-clock

JavaScript
1
star