LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control 32*32 LED matrix from the Labview(arduino)

I am working on a project in where I have to lit up the four corners of the 32*32 LED matrix one after one.

 

I am using adafruit 32*32 LED matrix which operate at power requirement 5V and 2000mA.

I am using arduino uno which connected to the LED matrix

and now I wanted to control the lit up pattern of the LED matrix from the Labview, I already installed the arduino drivers in labview and I am not able to create a controls for the pattern what I need.

 

As I have 32*32 LED matrix, in first I wanted to lit up the first 4*4 matrix of the LEDs and then second and then third and fourth as shown in picture below.

 

 

illumination.JPG So if some one have idea to do the same then it would better for me to do the same. 

 

0 Kudos
Message 1 of 20
(5,446 Views)

The short answer is that you can't control this 32x32 RGB LED matrix from LabVIEW.

 

As it is, the C++ code that will run on the Arduino to control the 32x32 RGB LED matrix is complicated.

I suggest you learn to program in C++ and get the code from Adafruit's website and hope that the matrix you have will work with their code!

 

 

.

 

Message 2 of 20
(5,416 Views)

Yep I would have to agree with NYC here, that level of Arduino code is far beyond the capabilities of LINX.

 

I am not saying it can't be done with LabVIEW but you are going to have to start from scratch including the Arduino interfacing part.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 20
(5,411 Views)

Hello All,

 

I am making illumination system and for the same I am using RGB matrix 32*32 from adafruit and arduino uno.

which is a small task of big project.I can say first step.

 

according to the system requirement I have to light up the four corners of the RGB matrix one by one as shown in image below.

according to the image, I have attached below, I light up the first corner of the RGB matrix and then wait for little time then I light up the second corner again wait and then light up the third corner and again wait and then light up the fourth corner of the RGB matrix and at the end all LEDs will be off and repeat the same programme after some delay.

 

So for the same task I have already wrote the programme in arduino to do the same, so what I need next is to control the whole arduino programme from the labview to run the loaded programme in arduino when previous.

 

for example: my whole project will be workd in this way.

 

first illuminate the sample the then take a picture of the sample do some image processing stuffs like detecting the blood cells from the sample and scan the detected sample in a raster manner again illuminate the sample and do the same......

 

As I am using galvano mirrors for the scanning I have to use Ni DAQ max for the AI and AO operations.

 

So I need to call the arduino programme from the labview to run the loaded programme when first cycle finished and I have to illuminate the sample again.

 

in simple I have to call the arduino programme after each iteration.

 

I have attached my arduino programme as well.

I am using Ni DAQ max so if any one knows to control the arduino programme by using the Ni DAQ max then it would also be nice for me.

 

#include <Adafruit_GFX.h>
#include <RGBmatrixPanel.h>

#define CLK  8   
#define OE   9
#define LAT 10
#define A   A0
#define B   A1
#define C   A2
#define D   A3

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);
void setup()  {
   
   
}

void loop() {

  matrix.begin();
  delay(3000);

   matrix.fillRect(0, 0, 16, 16, matrix.Color333(7, 7, 7));
   delay(1000);
   matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 0, 0));
   delay(500);
  
  
   matrix.fillRect(0, 0, 16, 16, matrix.Color333(0, 0, 0));
   matrix.fillRect(0, 16, 16, 32, matrix.Color333(7, 7, 7));
   delay(1000);
   matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 0, 0));
   delay(500);
  


   matrix.fillRect(0, 0, 16, 16, matrix.Color333(0, 0, 0));
   matrix.fillRect(0, 16, 16, 32, matrix.Color333(0, 0, 0));
   matrix.fillRect(16, 16, 32, 32, matrix.Color333(7, 7, 7));
   delay(1000);
   matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 0, 0));
   delay(500);
  
   
   matrix.fillRect(0, 0, 16, 16, matrix.Color333(0, 0, 0));
   matrix.fillRect(0, 16, 16, 32, matrix.Color333(0, 0, 0));
   matrix.fillRect(16, 16, 32, 32, matrix.Color333(0, 0, 0));
   matrix.fillRect(16, 0, 32, 16, matrix.Color333(7, 7, 7));
   delay(1000);
   matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 0, 0));
   delay(500);
  
    

  
  
  
   
  }

 

illumination.JPG

0 Kudos
Message 4 of 20
(5,429 Views)

You did not mention how the LV and Arduino are going to talk to each other. 

 

Simple would be a Serial link since UNO has already the required port and the Serial<> USB convertor.  Just send a single byte to the Arduino when required and once it reads it make it do what you want ? All that the Arduino needs to do is sit and listen for your command. 

 

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 5 of 20
(5,426 Views)

I am using USB cable to make communication link between arduino and Labview.

 

But the problem is i do not know which pin I have to trigger in arduino to send the byte when i want to run the

 

I have attached image to see the connection.

between arduino to PC (USB cable)

Between Arduino shield to LED matrix(Flat Ribbon cable with 16 pins)

Power supply for the LED matrix (Wall adapter)

 

I need to trigger the arduino programme after each iteration but I do not know at which I should send the byte of signal to trigger the arduino.

 

I have attached the simple programme to switch on or off the LED at specific Pin.

 

I follow this pdf for the connections from adafruit.

https://cdn-learn.adafruit.com/downloads/pdf/32x16-32x32-rgb-led-matrix.pdf

 

 

 

programme written into the arduino.arduino LED connection.JPG

0 Kudos
Message 6 of 20
(5,410 Views)

Well when you use the Serial way to communicate its the Pin 0 and 1 on the Arduino and by default these are the ones which are broken out to the USB . 

I am not sure about your strength in Arduino but let me try to tell what is possible :

1. Arduino besdies running your RBG loop will also have a Serial read running.

2. It will keep monitoring the Serial port for any character. ( Refer the Arduino Forum for Serial Basics by Robin. Good one ) 

3. Your LV code will be running a VISA serial session which is initilaized and linked to the Arduino Serial port ( via USB of course ) and whenever you want to kick the Arduino to do some work, you send a single byte via the Serial from LV to UNO.

 

The UNO reads it and if it matches with the one you programmed - maybe "Y" then it flashes the LEDs and goes to wait for the next command. 

 

Please note in this there is no Digital Pins involved. 

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 7 of 20
(5,401 Views)

@MogaRaghu wrote:

Well when you use the Serial way to communicate its the Pin 0 and 1 on the Arduino and by default these are the ones which are broken out to the USB . 

I am not sure about your strength in Arduino but let me try to tell what is possible :

1. Arduino besdies running your RBG loop will also have a Serial read running.

2. It will keep monitoring the Serial port for any character. ( Refer the Arduino Forum for Serial Basics by Robin. Good one ) 

3. Your LV code will be running a VISA serial session which is initilaized and linked to the Arduino Serial port ( via USB of course ) and whenever you want to kick the Arduino to do some work, you send a single byte via the Serial from LV to UNO.

 

The UNO reads it and if it matches with the one you programmed - maybe "Y" then it flashes the LEDs and goes to wait for the next command. 

 

Please note in this there is no Digital Pins involved. 


Please do not waste time on this.

 

The short of it, which he refuses to believe, is that he can't control that panel from LabVIEW !

 

He already has another post on this same topic.

https://forums.ni.com/t5/LabVIEW/How-to-control-32-32-LED-matrix-from-the-Labview-arduino/m-p/384327...

 

 

.

0 Kudos
Message 8 of 20
(5,388 Views)

while posting that question I did not have a programme to control the LEDs from the arduino, but as of now I have code to control the LEDs from the arduino.

So what I want to do is to call the code in arduino to do task.

 

I am not wasting some ones time.

 

I am also trying to do the same by using the NI DAQmx to set digital 1 and 0 at pin 0 or 1 of arduino.

0 Kudos
Message 9 of 20
(5,381 Views)

When the same topic appears twice the general impression is of duplicated efforts.

 

Anyway what i told you is a simple method to avoid using DAQMx with the existing resources ( Serial port ) and I am not sure if you want to go that way. 

Andhif you have a suitable Hardware like a USB 6001 module then of course its a very easy thing with DAQMx as it just translates to handling one DO bit and reading that in Arduino as a DI. 

 

Looks like some homework is required and if the planned concept is explained, its much easy to help

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 10 of 20
(5,375 Views)