06-14-2013 04:03 PM
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
Solved! Go to Solution.
06-14-2013 08:46 PM
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.
06-15-2013 12:22 AM
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
06-15-2013 03:28 AM
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.
06-15-2013 07:16 AM
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
06-15-2013 02:01 PM
I uploaded a version of the VI saved for 2009 in place of the original above. Let me know how it works.
06-17-2013 02:54 AM
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!
Thank you for your help Nathan!
Alvin Chandra
02-20-2015 04:55 AM
i have the same problem but i need to use digital i/o!!! What can i do?
10-30-2017 11:41 AM
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
05-26-2019 07:01 AM
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!