National Instruments Corporation, NI, is a world leader when it comes to automated test equipment and virtual instrumentation software. LabVIEW is a product that they have developed, and it is being used in many labs throughout the world. LabVIEW, which stands for Laboratory Virtual Instrument Engineering Workbench, is programmed with a graphical language known as G; this is a dataflow programming language. LabVIEW is supported by Visual Package Manager (VIPM). VIPM contains all the tools and kits to enhance the LabVIEW product.
Arduino is a single-board microcontroller. The hardware consists of an open source hardware board that is designed around the Atmel AVR Microcontroller. The intention of Arduino was to make the application of interactive components or environments more accessible. Arduinos are programmed via an integrated development environment (IDE) and run on any platform that supports Java. An Arduino program is written in either C or C++ and is programmed using its own IDE.
Welcome to programming Arduino with LabVIEW. During the course of this book, we will take you through working with Arduino through NI's LabVIEW product. The following are what you will need:
A Windows or Mac-based machine
Arduino (Uno preferred)
LabVIEW 13 for students (or any other LabVIEW 13 distribution)
We will work with Servos, LEDs, and Potentiometers in both analog and digital configurations.
The Arduino community is extremely vast with thousands and even hundreds of thousands of projects that can be found using simple searches on Google. Integrating LabVIEW with Arduino makes prototyping even simpler using the GUI environment of LabVIEW with the Arduino platform.
Officially, LabVIEW will work with the Uno and Mega 2560; however, you should be able to run it on other Arduino platforms such as the Nano. Building your own Uno board is just as simple as linking up the Arduino to LabVIEW. For detailed instructions on how to build your own Arduino Uno, check out the following URL: http://www.instructables.com/id/Build-Your-Own-Arduino/.
The graphical system design takes out the complexity of learning C or C++, which is the native language of Arduino, and lets the user focus on getting the prototype complete.
LabVIEW significantly reduces the learning curve of development, because graphical representations are more intuitive design notations than text-based code. Tools can be accessed easily through interactive palettes, dialogs, menus, and many function blocks known as virtual instruments (VIs). You can drag-and-drop these VIs onto the Block Diagram to define the behavior of your application. This point-and-click approach shortens the time it takes to get from the initial setup to a final solution.
With LabVIEW primarily being designed for and targeted at scientists and engineers, it has not excluded itself from being used by hobbyists. Users who have zero programming skills have been able to take entire projects to completion by just following the intuitive process of dragging controls onto the diagram and setting it up to automate.
We have designed this book to be completely intuitive, using parts that can be easily found at your local electronic store.
To get additional support when using LabVIEW with Arduino, have a look at their forum at https://decibel.ni.com/content.
To download or purchase LabVIEW, head out to http://www.ni.com/trylabview/. LabVIEW can also be purchased with an Arduino Uno bundle from SparkFun. At the time of writing this book, the URL for this bundle is https://www.sparkfun.com/products/11225.
If you did not download LabVIEW, do so now. To try LabVIEW without purchasing it, click on Launch LabVIEW.
To install the product, click on all the default options. Note that the Arduino plugin is not found in the initial install of LabVIEW.
Once LabVIEW is installed, launch the Visual Package Manager.
The VIPM will now launch. The VIPM application will look like this:
The VIPM will start downloading references to the package bundles into its repository. The status bar is located at the bottom of the application; when the references are downloaded, the status bar will switch to Ready.
To download the Arduino IDE, go to http://arduino.cc/en/main/software. This book covers the Windows versions of LabVIEW and Arduino; however, the Mac versions will work just as well.
Click on Windows Installer to download the Windows version of the Arduino IDE.
To install the product, click on all the default options.
Once the Arduino IDE is installed, click on the shortcut shown here to launch the application: