Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7848789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:19:56+00:00 2026-06-02T18:19:56+00:00

My in-browser LED Display object has LED objects stored in it’s map property. Each

  • 0

My in-browser LED Display object has LED objects stored in it’s map property. Each LED has x and y properties so as to know where it is on canvas, while map is a 2D array of the LEDs (which can be of different sizes) that maps them on the Display matrix. The display object also has properties that define the LEDs’ area and the space between them.

The display should be able to show characters, such as numbers and letters, from a pre-made font.

What I can’t get my head around is: what is the best way to display characters? For example, here is an example of how the letter ‘S’ might look like (. is a LED display turned off, O is a LED display turned on:

..OO..
.OOOO.
OO..OO
OO....
.OO...
..OO..
...OO.
OO.OO.
.OOO..
..OO..

How should I map which LEDs are to be switched on?

My current solution is: create a Character object that has the properties x and y (which determine it’s place on the display matrix) and width and height (which determine it’s area in LEDs). The LEDs that are supposed to be on are then mapped in a 2D array. When we need to show a character, we get the Character‘s x and y, find the ‘source’ LED and then switch the LEDs on as mapped.

Is there a better way? Using paths, perhaps?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:19:57+00:00Added an answer on June 2, 2026 at 6:19 pm

    I’m not entirely sure from your description how you’re doing it, but here’s how I’d do it based on what I think you’re after.

    First step, get all your characters worked out in arrays defining which points need leds on or off. If this is going to be a big set you could try some techniques to compress the data.

    Depending on the size of your LEDs on the canvas I’d either create a function that calculates which leds need changing and only wipe the display where there are LEDs that need changing. Pre-render the LEDs (on and off state) once, like a display list in openGL (see link below).

    Otherwise if the characters themselves are quite small on the screen and there are lots of them I would pre-render each entire character and use like a font. This is would require much more clearing of the screen, but if there are hundreds of LEDs the overhead of calculation and display clearing might be high.

    This page has some good information about efficient canvas rendering:
    http://www.html5rocks.com/en/tutorials/canvas/performance/

    I’ve assumed the LED’s are rendered in the program and are not just images? If they’re just images then you have effectively pre-rendered the LED already.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a monochrome in-browser 'LED' display. It should have a matrix of 33
Every browser has different native keyboard shortcuts. Which ones are free / safe to
any specific browser will support for html5 and jquery mobile application? While creating mobile
ie browser has a checkbox alignment problem actully ie take default size of checkbox
Index browser (UI tool) for Lucene .NET index - does it exist? I know
Every browser has print preview command in their File menu I want to make
My browser, Firefox 3.6, seems to display the Mathml equations in the W3C test
While working with browser events, I've started incorporating Safari's touchEvents for mobile devices. I
I'm trying to use for as an object property name. It seems to work
My browser (ie. my OS) should know I'm in Australia and what the correct

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.