Setting up a Raspberry Pi to control a WF32 with LabVIEW

I recently wrote an指导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.屏幕截图2016-06-03,上午11.55.01

  2. Choose the chipKIT WF32.屏幕截图2016-06-03,上午11.55.28
  3. Go to Device Manager.屏幕截图2016-06-03,上午11.56.57
  4. Click on “Ports(COM & LPT)” to find the WF32’s COM port.Screen Shot 2016-06-03 at 11.57.25 AM
  5. 选择您的设备COM端口。Screen Shot 2016-06-03 at 11.57.57 AM
  6. 配置网络设置:Screen Shot 2016-06-03 at 1.31.26 PM
    • SSID是您网络的名称。
    • 分配Chipkit WF32可用的IP地址。您需要以后再次指定此IP地址作为Linxinit VI的输入。
    • 选择要使用的端口;除非您有理由使用另一个;您应该选择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这里。屏幕截图2016-06-03,下午1.34.04
    • Linx是使用Raspbian Jessie开发的。
  2. 单击Raspbian Jessie图像下的下载ZIP按钮。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这里。屏幕截图2016-06-03,下午1.41.08
  5. 下载Win32磁盘成像器。Screen Shot 2016-06-03 at 1.41.56 PM
  6. 从您的下载文件夹中打开它。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. 选择程序文件(x86)。屏幕截图2016-06-03在1.50.12 pm
  10. 选择ImageWriter。屏幕截图2016-06-03,下午1.50.44
  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.屏幕截图2016-06-03,下午2.05.56
  15. 输入Raspberry Pi的主机名或IP,以及带有根特权的用户名和密码,然后单击“连接”。(最终您需要将Raspberry Pi连接到WiFi,请单击这里if you need help).Screen Shot 2016-06-03 at 2.07.46 PM
    • 默认主机名是“ RaspberryPi”。
    • 默认用户名是“ pi”,默认密码为“覆盆子”。
  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

步骤3:Raspberry Pi - 部署启动可执行

  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. 在“项目”文件夹中选择“空项目”。屏幕截图2016-06-03,下午2.22.32
  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. 右键单击“项目:无标题项目1”,然后选择“新”»“目标和设备”。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.屏幕截图2016-06-03,下午2.28.01
  7. 在“常规”类别下,输入Raspberry Pi的IP地址(这应该是您在上一步中设置的IP地址)。Screen Shot 2016-06-03 at 2.28.54 PM
  8. 下一步是为Raspberry Pi 2打开销钉图,以供以后使用。从前面板中,选择“帮助»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).屏幕截图2016-06-03,下午2.34.22
  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. 将您选择的项目拉到Raspberry Pi 2部分,然后右键单击“构建规格”(我的称为“ RaspberryPi-WF32_FAN_CONTROL”)。然后选择新的»实时应用程序。fx51oltip08x58s.large
  12. Rename the build specification.屏幕截图2016-06-03,2.38.22 pm
  13. 单击对话框左侧的源文件类别。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. 单击完成。
  17. 右键单击新的构建规范,然后选择运行作为启动。
  18. 单击是重新启动目标。现在,每当目标启动时,VI将运行。

我的下一篇文章将向您展示我使用这些步骤进行的Labview项目。感谢您的阅读,并随时发表评论。

0
成为第一个投票。

关于奥斯汀·斯坦顿

查看Austin Stanton的所有帖子→

发表评论

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