From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

DOT MATRIX (see your name in lights!!) Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example VI demonstrates loading a bitmap image (8 or 24bit colour depth) and displaying it with a 2D array of LEDs.


Description
Loading a Bitmap file gives a 2D pixel map. After calculating the average intensities for the square of pixels represented by 1 LED, convert the 2D array of average intensities to a 2D array of Booleans. This is accomplished by comparing against a threshold value. The F10 button is used to stop the application. The Stop button is outside of the viewable screen and associated with the F10 button.


Requirements

 

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

 

1.Pop up to allow user to select colours for the Dot Matrix

2.Load the bmp file

3.Convert the 1D array of pixel intensities from the Bitmap into a 2D pixel map

4.Determine the average intensity for the pixels represented by 1 LED

5.Convert the 2D array of average intensities into a 2D array of Booleans

 

Additional Information or References
VI Snippet

00.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
alpha1
Active Participant
Active Participant
on

That's an awesome community example Rich! Thanks!

Regards,


Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants

GrahamG
Member
Member
on

Sweet App!!

Clever use of the differing formats of bmp files - this could come in handy in many more serious applications too

And as you say seeing your name in lights  does give a special thrill, Today LabVIEW, Tomorrow Broadway, Next week - THE WORLD!!

Graham Green

Sr. Product Marketing Manager

National instruments
Mark_SAI
Active Participant
Active Participant
on

Awesome simple app Mr R, great for showing someone the basics of many ideas (Clean UI, simple algorithms, code commenting) I may have an application for this! (Best compliment is copying someones code and all that...!)

Great VI Icons, good commenting, nice use of the Application Directory primitive, clean user interface, everything I'd expect from a RR masterpiece!

But where is the love for the error wire/error case structure (particularly in ColourSelector.vi?! ) You show love for it in the Bitmap loader vi...   hehe.

theno1dj
Member
Member
on

Any chance of having this to work with 8.5??

Cheers

RER
NI Employee (retired)
on

Hi Theno1dj, I have just added a version of the code saved in LabVIEW 8.5.

Enjoy!!

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/