Before opening this example, make sure to install the LabVIEW Interface for Arduino.
Description:
This example shows how to read an analog input on the Arduino using the LabVIEW Interface for Arduino.
Tutorial:
I encountered an error 5005 while working on this example on my Arduino Mega 1280. In case some of the members got the same error, just follow this steps to fix it.
I test it again on analog input pins 0 - 7 without encountering any errors at all. However, on analog pins 8 - 15 it displayed an error 5000 stating that the pins are not present on the board. To fix it, simply do this steps:
After successfully reading from pin 8, I tested the program to read from analog pins 9 - 15 and it works fine.
That's it. I can now read data from analog pins 0 - 15.
LT@1R,
We have not had a chance to do any testing with the 1280 so I cannot recreate this issue in house. Is the 1280 listed as an arduino under windows device manager? The Init VI will attempt to auto connect to the first device with a name that contains the work arduino (which the uno and mega 2560 will). It is better to specify the COM port as you suggest for two reasons. First, specifying the COM port to use will greatly reduce the time required to find and connect to the Arduino since you no longer have to populate a list of all VISA resources and scan through them until you find an Arduino (this is what the init VI does when there is nothing wired to the VISA resource input). Second, specifying the COM port allows you to use any Arduino, even if it does show up with the name Arduino in device manager (for example the Duemilanove)
Whenever you get an error code such as '5005' try searching ni.com for the code. You will usually find a Knowledge base article such as this one describing the error.
As for your work around for analog pins 8-15 there is an easier way to accomplish this. On the Init.vi simple specify the board type as Mega 2560. At this point the board type is mainly used to ensure that you are using the correct pins for the board. Since we have not tested the 1280 it is not an option as a board type, but the 2560 is and it also has 15 analog input pins.
I hope this cleared a few things up. Let us know if you have any more questions.
-Sam
LIFA Developer
how about connection bluetooth from arduino uno to dasboard labview in android? or put input dasboarad labview from bluetooth?
HI!
I tried to make this code on my arduino Uno with a potetiometer. When I try, no problem exept one : the value is ALWAYS around 60- 62 and I don't understand why because when I make a very simple code on the arduinosoftware, it seems to work (value between 0 - 1024).
Can you help me please?
HELLO
I wonder if you could make the communication with labview Arduino UNO? Its test before sending look like the hardware in case the Arduino?
I'm not detect the arduino. Have intalei the VI package manager and toolkit for labview arduino. The labview to use is 2010. And arduino uno.
Gives error 5005, 5003, 5002 ...
thank you
Wagner.
I asked you how to acquire four analog breads strenuous DUE Arduino in LABVIEW ..
Hi how I can saved analog input arsonists in Lancome .thanks
Hi how I can save input analog arduino in labview.tanks
U can use filel/O functions with out any changes
بتاريخ ٠٩/١٠/٢٠١٦ ١٠:٠٦ ص، جاء من "maryamman" <web.community@ni.com>:
NI Community <https://decibel.ni.com/content/index.jspa>
Arduino Example: Analog Read new comment by maryamman
<https://decibel.ni.com/content/people/maryamman> View all comments on
this document
<https://decibel.ni.com/content/docs/DOC-16067#comment-51596>