LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview interface for arduino mega problem.

Solved!
Go to solution

Hi,

I am using LIFA for my projects and i wondering about the limitation of pins that can be used in arduino mega..

Since the LIFA Base is made for arduino UNO, the number of pins available for analog is A0-A5 and for digital is D0-13 ( if I am not mistaken ). But in case of arduino mega, the number of pins are much more larger..

I am testing a program to control the analog pin 8 and nothing happen, I am searching for the problem then I figured out that the program in LIFA library in arduino is limited to Analog pin 5 which is can be seen on the attachment..

In case of my project, I need about 10 analog pins..

It is possible to increase the number of analog pin that can be used in arduino mega? (I need help since I am not really good in complex C programming)

I hope you guys understand what I mean.. Sorry for my bad english

0 Kudos
Message 1 of 10
(10,305 Views)

LIFA_Base.ino is coded for both Uno and Mega.  Only the analogReadPort() function is limited to those pins.  You can access individual analog pins with "Analog Read Pin.vi"  If you would like to get multiple pins at once you can simply change the pins that are read by the analogReadPort() function and then use "Analog Read Port.vi" to get your specific information.  Note:  If you edit analogReadPort(), do not change how many pins are read unless you are familiar with making custom LIFA functions.

0 Kudos
Message 2 of 10
(6,291 Views)

Hi Nathan,

I want to read 10 analog inputs at the same time...

So, I need to change the number pins that can be read in the arduino program. But I am not familiar with complex C language..

Anyone can help me with changing the number of pins that can be read in labview? I need from A0-A9 inputs to be read at the same time..

Thanks,

Alvin Chandra

0 Kudos
Message 3 of 10
(6,291 Views)
Solution
Accepted by topic author Chandras

Ok, try this.  Replace your LabVIEWInterface.ino with this one and then use the attached VI to get your values.

EDIT:  Re-uploaded the VI saved for LabVIEW 2009.

Download All
0 Kudos
Message 4 of 10
(6,291 Views)

Hi Nathan,


Thank you for your help

I can't open the vi since my labview is older version (2010). And i still can't test your program since it is weekend and I left all of my projects on my university.

I will inform inform you if I had already tried the program..

Thank you once again. I really appreciated your help !

Alvin Chandra


0 Kudos
Message 5 of 10
(6,291 Views)

I uploaded a version of the VI saved for 2009 in place of the original above.  Let me know how it works.

0 Kudos
Message 6 of 10
(6,291 Views)

Hi Nathan,

I had already try the program and it works!

I do some experiment where I replaced all the AnalogReadPort() function with your modification one (see pictures) and it is working perfectly with analog read pin in lowlevel panel!

Untitled.png

Thank you for your help Nathan!

Alvin Chandra

0 Kudos
Message 7 of 10
(6,291 Views)

i have the same problem but i need to use digital i/o!!! What can i do?

0 Kudos
Message 8 of 10
(6,291 Views)

Hi Nathan,

 

I want to read 16 (A0-A15) analog inputs at the same time with my Arduino Mega! Can you send me a VI and the modified LabViewInterface.ino for a port of 16 analog inputs?

Thanks,

Pasquo

 

0 Kudos
Message 9 of 10
(5,686 Views)

I have the same problem and I can't find a solution. It is very strange that there is support for the board Mega, and the input / output range is just for the board Uno. Please help me!

0 Kudos
Message 10 of 10
(4,151 Views)