Getting Started with Raspberry Pi and LabVIEW Community Edition
5 Steps for Getting Started
These tutorials are designed to introduce you to the core concepts needed for initial product setup.
Before You Begin
Make sure you have the following items:

Accessories
- Ethernet cable
Get an introduction to the LabVIEW Community edition and how you can use it with popular hobbyist hardware.
Download and Install
Step 1.
During this process, you will be installing and activating the following software and drivers on your development computer:
- LabVIEW Community Edition
- Download LabVIEW Community Edition here.
- Follow the installer prompts to complete the software installation. In order to use the Raspberry Pi device with LabVIEW, you need the LINX toolkit. This toolkit is automatically installed with LabVIEW Community Edition.
- You may be prompted to restart.
Activate and Register
Step 2.
- After the installation is complete, the Activation Wizard opens automatically.
- When you are prompted, click LOG IN TO ACTIVATE.
- Enter your NI User Account credentials and click LOG IN.
All your unlicensed products are listed in then Activate Software window.
- Select Check my account for licenses and click Activate.
If the Check my account for licenses method does not successfully activate your software, you can use your serial number to activate your software, instead. Select Enter a serial number in the Activate Software window, enter your serial number for each product, then click Activate. Learn how to find your software serial number.
- After the licenses associated with your account are verified successfully, click the Finish button to complete activation.
This process registers your software to you. After registering your software, you can access support and online training.
- If you're working offline or neither of these methods work, try one of these alternative methods for activating NI software:
- Offline Activation--If you are activating your software on an offline machine, visit the NI Product Activation page and fill out the Activation Code Generation Form. Notice that you will need a serial number and computer ID to complete this process. You can find your computer ID in the Activation Wizard or using the NI License Manager.
- Volume or Enterprise License Activation--If you have a Volume License or Enterprise Agreement, your software is licensed using a license server. Contact the software administrator for your company for more information.
- Academic Volume License Activation--If you are a student using an Academic Volume License, you will receive one or more serial numbers that can be used to license and activate your NI software. You can install software individually on a computer, and you will need to activate the software on each computer. For more information about deploying NI software to multiple machines, refer to the Academic Volume License Administrator Resources
- Restart your computer, if prompted to do so.
You've now installed the LabVIEW software that you'll need for your Raspberry Pi device.
Configure the Hardware
Step 3.
The next step is to physically connect and set up your hardware. Watch the video or follow the written instructions to see how this is done.
Use these written instructions to follow along with the video.
- Use Raspberrypi.org to help you accomplish these tasks.
- Get an up-to-date Raspian operating system for your device. Choose an OS version that includes the desktop option.
- You will need to flash the OS to a microSD card. You can choose from a variety of low-cost USB adapters and free imaging software to complete this task.
- Note the default username and password for your device.
- Connect a monitor, keyboard, and mouse to the Raspberry Pi.
- You will also need to provide power and an Ethernet connection. The Ethernet cable must be connected to a switch or router with internet access, as the Raspberry Pi downloads the files directly from an external feed. The Raspberry Pi should be on the same subnet as your computer, as they need to communicate during configuration. The details of the following steps may vary with newer versions of the OS; refer to the Raspberry Pi website as necessary.
- The first time you start the Raspberry Pi, you will need to enter some configuration information such as country and time zone. After the OS configuration is complete, enable SSH; as it is normally disabled by default. From the GUI, go to the upper left corner and open the applications menu by selecting Preferences>>Raspberry Pi Configuration. In the window that appears, select the Interfaces tab, set SSH to enabled, and click the Close button.
- Find the IP address of the Raspberry Pi. Go to the upper right corner and hover over the network icon. It should display any Ethernet or wireless connections. You want the address for the hard-wired Ethernet connection. You will use this address in the next step.
- You no longer need the mouse, keyboard, or monitor; leave your Raspberry Pi connected to power and Ethernet.
- Launch LabVIEW Community Edition and open the Target Configuration Wizard from Tools»MakerHub»LINX»LINX Target Configuration.
- Select Raspberry Pi from the pull-down menu.
- Depending upon your network configuration, you may need to use the IP address rather than the host name. Update the IP address, username, and password as necessary.
- Press Connect to connect to the device. After a moment, you will see the screen update showing that the device connected.
- Click the Install Software tab.
- Click Install.
- You will see the currently installed version, if any, and the latest available version.
- Press Upgrade (or re-install) to start the process. This step can take several minutes to complete.
- Click ok to exit the wizard.
That's everything you need to do to prepare your Raspberry Pi for use with the LabVIEW Community Edition. You can now move on to deploying and running your first application.
Explore an Example
Step 4.
Now you are ready to create your first application. Watch the video or follow the written instructions to see how this is done.
Use these written instructions to follow along with the video.
You are ready to build your first example. This application deploys a LabVIEW VI to your Raspberry Pi that blinks an LED on and off at a fixed rate.
Find an Example
- Connect your Raspberry Pi to power and Ethernet, if you have not already done so.
- Launch LabVIEW, go to the Help menu, and select Find Examples to launch the Example Finder.
- Go to the Search tab, type in LINX, and press <Enter>. You will see a list of LINX compatible examples on the right.
- Double click the LINX - Blink (Advanced).vi to load the example.
- Close the Example Finder.
Edit and Run the Example
- You will see some controls and indicators on the the front panel of the example. The front panel has three parts:
- Left: Basic schematic you need for the LED circuit
- Middle: Configuration settings
- Right: Indicator showing the status of the LED
- Before you start editing, save a copy first. Go to File>Save As... to open the File dialog box.
- Select Substitute Copy for Original.
- Click Continue.
- You need to edit the block diagram, which is the code for the VI. Show the block diagram by going to the Window Menu item and selecting Show Block Diagram.
- The functions you see on the diagram are part of the LINX toolkit. The LINX toolkit provides a common API for the supported devices. The common pattern is an open call, followed by some actions, and a close call.
Here you can see the open call is configured for serial communication with the device, the digital output is being written over and over again in a loop, and when the user presses the stop button the loop exits and the communication channel is closed. - Click the selector and choose Local I/O. Delete the resulting broken wire and COM port control.
- Save the VI.
- Close the block diagram.
- To deploy the VI to your device, you will need a project. Go to the Project menu, and select Create Project…
- Select Blank Project and click Finish. A dialog box will prompt you whether you want to add the VI to the project. Select Add.
- We need to add the Raspberry Pi to the project. Right-click the Project entry, select New>>Targets and Devices.
- We will manually add the device. Select New target or device, LINX devices, and finally the Raspberry Pi and click OK.
- Right click the Raspberry Pi and select Properties.
- Enter the IP address you noted during the configuration process.
- Click OK.
- You can verify connectivity to your device by right-clicking it, and selecting Connect. After a moment, it should connect and the small green dot should change from dark to light. If the color does not change, check your USB connection and IP address.
- Now we need to move the VI to the target. First close the VI, then go back to the Project Window and drag the VI from My Computer to the Raspberry Pi.
- Double-click the VI to reopen it. This method is the easiest way to ensure your VI is associated with the correct target. You can verify this association in the lower left corner.
- Save your project.
- Set up an LED and resistor based on the circuit shown on the front panel. Connect it to ground and DIO 7.
- Change the control to select DIO 7.
- Click the Run button.
- LabVIEW deploys all of the necessary code on the Raspberry Pi. After that process finishes, the VI starts running, and you can see both the physical LED blinking, as well as the status LED on the front panel. You can refer to the help for a list of supported lines and pinout information.
That’s everything, you’ve run your first Raspberry Pi example.
Create a Start-up Application
Step 5.
Learn how to create a start-up executable for your Raspberry Pi. This file enables your device to run a VI on power-up, independently of your computer. Watch the video to see how this is done.
Where to Go Next
Resources
To continue learning about using LabVIEW Community Edition, NI provides you with a number of options.
Learn More About Programming in LabVIEW
Browse example code to use as a starting point then modify it to fit your needs.
Finding Example VIs in LabVIEW
LabVIEW Example Code Repository
Explore the LabVIEW environment, dataflow programming, and common LabVIEW development techniques.
Learn to use common design patterns to successfully implement and distribute LabVIEW applications for research, engineering, and testing environments.
Explore Learning Resources
Explore these additional learning resources to continue building your LabVIEW Community Edition skills.
Explore community contributed code examples
Browse Product Documentation
Access detailed procedures, specifications, programming syntax, and more.
