LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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


@mi wrote:

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.


You can't "call the code in arduino to do task".

You simply don't understand how the Arduino works, and what you are writing is rubbish.

 

 

/

0 Kudos
Message 11 of 20
(1,743 Views)

By using the System Exec VI into the LabVIEW, some how I am able to load the written arduino code.

 

But, It is taking long time while it opens the arduino.exe each time and then upload the programme every time when I runs the VI.

 

cmd.JPG

0 Kudos
Message 12 of 20
(1,721 Views)

@mi wrote:

By using the System Exec VI into the LabVIEW, some how I am able to load the written arduino code.

 

But, It is taking long time while it opens the arduino.exe each time and then upload the programme every time when I runs the VI.

 

cmd.JPG


 

You are using the command line version of the Arduino IDE to upload Arduino code into the Arduino.

 

You still would have to program in C/C++ for the Arduino and write working Arduino code  *.ino  if you want to do that.

If all you wanted to do was do that, you should have said so in the first place.

 

.

 

 

 

 

0 Kudos
Message 13 of 20
(1,719 Views)
#include <Adafruit_GFX.h>
#include <RGBmatrixPanel.h>

#define CLK  8   // USE THIS ON ARDUINO UNO, ADAFRUIT METRO M0, etc.
#define OE   9
#define LAT 10
#define A   A0
#define B   A1
#define C   A2
#define D   A3
#define ledPin 1


RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);
void setup() 
{
   matrix.begin();
   Serial.begin(9600);
   pinMode(ledPin, OUTPUT);
}

void loop()
{
     if(ledPin == HIGH)
          {
          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, 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(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(16, 0, 32, 16, matrix.Color333(7, 7, 7));
          delay(1000);
          }

          else 
          {
          matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 0, 0));
          delay(2000);

          }       
}
  

I have wrote the programme in arduino and that would be in C right?, I have attached the file.

where I am using if and else statement.

 

So I am using pin 1 digital Input\output and configured to write 0 and 1 value 

 

and later on in programme I wrote that if pin 1 is high means 1 then perform the below steps and else means low then all LEDs will be off.

 

So am I right to write programme in C for the RGB matrix what do next ?

0 Kudos
Message 14 of 20
(1,715 Views)

Okay here is the deal, LabVIEW will not do what you are trying to do as many have stated.

 

You have two options here :

  1. LINX has the ability to add libraries to it. Maybe you can add the libraries you need
    1. https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:libraries:linx:misc:porting_device
  2. Write your program in native Arduino code with support for changing the display through the Arduino serial port
    1. LabVIEW would only have to send a simple command to tell the Arduino what corner to light up
    2. You can't really say the arduino is running LabVIEW, but you can say LabVIEW is controlling the Arduino.
    3. In fact you don't need LabVIEW at all, it should work with the Arduino serial monitor or any serial terminal program
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 15 of 20
(1,705 Views)

Now I am able to call the arduino programme from the labview.

 

thank you very for the support

0 Kudos
Message 16 of 20
(1,690 Views)

@mi wrote:

Now I am able to call the arduino programme from the labview.

 


Please enlighten us with your soultion.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 17 of 20
(1,681 Views)

@RTSLVU wrote:

@mi wrote:

Now I am able to call the arduino programme from the labview.

 


Please enlighten us with your soultion.


 

I would like to be enlightened as to the "solution" as well.

 

"calling an Arduino program" from LabVIEW makes no sense !

 

Shaking my head.

 

 

.

0 Kudos
Message 18 of 20
(1,667 Views)

I programmed arduino to read the pin number 0 whether it is HIGH or LOW

 

and then I wrote in a way that if pin o is HIGH then perform specified operation if Low then perform the specified operation.

 

then I used Ni DAQmx to give HIGH and LOW value to call the arduino by giving HIGH(1) and LOW(0).

Thank you very much for help and support 

 

 

 

 

 

kkkk.JPG

0 Kudos
Message 19 of 20
(1,654 Views)

@mi wrote:

I programmed arduino to read the pin number 0 whether it is HIGH or LOW

 

and then I wrote in a way that if pin o is HIGH then perform specified operation if Low then perform the specified operation.

 

then I used Ni DAQmx to give HIGH and LOW value to call the arduino by giving HIGH(1) and LOW(0).

 


That's the definition of a Rube Goldberg machine.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 20 of 20
(1,650 Views)