09-28-2018 11:08 AM
@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.
/
10-01-2018 07:46 AM
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.
10-01-2018 07:51 AM - edited 10-01-2018 07:53 AM
@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.
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.
.
10-01-2018 08:38 AM
#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 ?
10-01-2018 09:38 AM
Okay here is the deal, LabVIEW will not do what you are trying to do as many have stated.
You have two options here :
10-02-2018 06:17 AM
Now I am able to call the arduino programme from the labview.
thank you very for the support
10-02-2018 09:12 AM
@mi wrote:
Now I am able to call the arduino programme from the labview.
Please enlighten us with your soultion.
10-02-2018 04:49 PM
10-04-2018 07:00 AM
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
10-04-2018 09:17 AM
@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.