Setting up a Raspberry Pi to control a WF32 with LabVIEW

I recently wrote an Instructable where I used a Raspberry Pi to control a WF32 over WiFi. Today I will share an extensive guide on how to set this up for your own applications!

Step 1: Connecting WF32 to WiFi

  1. Launch the LINX Firmware Wizard.Screen Shot 2016-06-03 at 11.55.01 AM

  2. Choose the chipKIT WF32.Screen Shot 2016-06-03 at 11.55.28 AM
  3. Go to Device Manager.           Screen Shot 2016-06-03 at 11.56.57 AM
  4. Click on “Ports(COM & LPT)” to find the WF32’s COM port.Screen Shot 2016-06-03 at 11.57.25 AM
  5. Select your devices COM port.Screen Shot 2016-06-03 at 11.57.57 AM
  6. Configure the network settings:Screen Shot 2016-06-03 at 1.31.26 PM
    • SSID is the name of your network.
    • Assign the chipKIT WF32 an available IP Address. You will need to specify this IP address again later as an input to the LINXInit VI.
    • Select the Port to use; unless you have reason to use another; you should select 44300.
    • You will need to specify this IP address again later as an input to the LINX Init VI.
    • Specify the Wifi security type and passphrase.
      • Note: It is recommended that you disable network security to start and then re-enable it after you confirm the LINX connection is working.
  7. Click Launch Example.Screen Shot 2016-06-03 at 1.32.05 PM


Step 2: Raspberry Pi Setup

  1. Download a Raspbian image here.Screen Shot 2016-06-03 at 1.34.04 PM
    • LINX was developed using Raspbian Jessie.
  2. Click the Download ZIP button under the RASPBIAN JESSIE image.Screen Shot 2016-06-03 at 1.35.50 PM
  3. Extract (unzip) the Raspbian image.Screen Shot 2016-06-03 at 1.39.05 PM
  4. Google win32diskimager and click on the top link or click here.Screen Shot 2016-06-03 at 1.41.08 PM
  5. Download Win32 Disk Imager.Screen Shot 2016-06-03 at 1.41.56 PM
  6. Open it from your downloads folder.Screen Shot 2016-06-03 at 1.42.52 PM
  7. Complete the installation, but uncheck both the View and Launch boxes after completing the Setup Wizard.Screen Shot 2016-06-03 at 1.43.53 PM
  8. Open File Explorer and go to This PC.Screen Shot 2016-06-03 at 1.49.08 PM
  9. Select Program Files (x86).Screen Shot 2016-06-03 at 1.50.12 PM
  10. Select ImageWriter.Screen Shot 2016-06-03 at 1.50.44 PM
  11. Then, select Win32DiskImager.Screen Shot 2016-06-03 at 1.51.26 PM
  12. Click on the folder next to the image file dialog box, and then select your raspbian jessie disk image.Screen Shot 2016-06-03 at 1.59.07 PM
  13. Insert the SD card into your computer and set the device dropdown so your SD card is selected, then click Write.Screen Shot 2016-06-03 at 2.03.07 PM
  14. Connect ethernet to the Raspberry Pi and power on your Raspberry Pi. Launch LabVIEW, and open the Target Configuration Wizard from Tools»MakerHub» LINX»Target Configuration.Screen Shot 2016-06-03 at 2.05.56 PM
  15. Enter the Raspberry Pi’s Hostname or IP, and a username and password with root privileges, then click connect. (Eventually you will want your Raspberry Pi connected to WiFi, click here if you need help).Screen Shot 2016-06-03 at 2.07.46 PM
    • The default Hostname is ‘raspberrypi.’
    • The default Username is ‘pi,’ and the default Password is ‘raspberry.’
  16. Click the Install Software tab and click Install. Then review any warnings and complete the installation.Screen Shot 2016-06-03 at 2.14.55 PM

Step 3: Raspberry Pi – Deploying a Startup Executable  

  1. Open up the LabVIEW project that you want to run and then select File-> New. Screen Shot 2016-06-03 at 2.22.08 PM
  2. Select “Empty Project” in the “Project” folder. Screen Shot 2016-06-03 at 2.22.32 PM
  3. A pop-up will ask you if you want to add the open VI to the new project, select Add. Screen Shot 2016-06-03 at 2.23.59 PM
  4. Right-click “Project: Untitled Project 1” and select “New”» “Target and Devices.” Screen Shot 2016-06-03 at 2.25.21 PM
  5. Select “Raspberry Pi 2 B” in the LINX folder and click OK. Screen Shot 2016-06-03 at 2.26.54 PM
  6. Right click “Raspberry Pi 2 B” and select Properties. Screen Shot 2016-06-03 at 2.28.01 PM
  7. Under the “General” category enter the IP address for your Raspberry Pi (this should be the one you set in a previous step). Screen Shot 2016-06-03 at 2.28.54 PM
  8. Next step is to open up a pin-out diagram for the Raspberry Pi 2 for later use. From the front panel, select Help»MakerHub»LINX»”Pinout – Raspberry Pi B.” Screen Shot 2016-06-03 at 2.31.43 PM
  9. Next, enter the correct values for the TCP settings, RPI settings, and the WF32 settings for the project you are going to use(mine is shown below). Screen Shot 2016-06-03 at 2.34.22 PM
  10. To make sure these values don’t change, click Edit»”Make Current Values Default.” Screen Shot 2016-06-03 at 2.34.44 PM
  11. Pull the project you selected into the Raspberry Pi 2 section and right click Build Specifications (mine is called “Raspberrypi-WF32_Fan_Control”). Then choose New»Real-Time Application. FX51OLTIP08X58S.LARGE
  12. Rename the build specification. Screen Shot 2016-06-03 at 2.38.22 PM
  13. Click the Source Files category on the left side of the dialog box. 13
  14. Under Project, Files select the top level VI (“Raspberrypi-WF32_Fan_Control” for me) and click the right arrow to add it to Startup VIs. Click OK. Screen Shot 2016-06-03 at 2.43.42 PM
  15. Right click the new build specification and choose Build. Screen Shot 2016-06-03 at 2.45.01 PM
  16. Click Done.
  17. Right-click the new build specification and choose Run as Startup.
  18. Click Yes to reboot the target. The VI will now run whenever the target is powered on.

My next post will show you the LabVIEW project I made using these steps. Thank you for reading, and feel free to comment with any questions you may have.


Be the 1st to vote.

Leave a Reply

Your email address will not be published. Required fields are marked *