Introduction: Display Weather and Location Using ChipKIT WF32 and LabVIEW

About: Software Engineer at Digilent Inc.

For this project, chipKIT WF32, LabVIEW, and LabVIEW MakerHub LINX are used to display both the current outside temperature in your area by pushing one of the on-board buttons, and your current location by pushing a different on-board button.

LINX provides easy to use LabVIEW VIs for interacting with common embedded platforms like Arduino, chipKIT, and the myRIO. The getting started with LINX in depth guide can be found here.

Step 1: Materials

Note - Digilent sells a bundle including LabVIEW Home Bundle and chipKIT WF32 called the LabVIEW Physical Computing Kit which can be found here.

1) LabVIEW

LabVIEW Home Bundle can be used for this project and is sold by Digilent here. Otherwise, any LabVIEW version can be used including the free trial located here.

2) chipKIT WF32

chipKIT WF32 is sold by Digilent here.

3) LabVIEW MakerHub LINX

Installation is free and in depth instructions and video guides can be found here to learn how to install and use LINX.

4) USB A to mini B USB cable

Step 2: Quick Setup

To connect the WF32 to your computer, simply use a USB to mini USB cable.

First, install LabVIEW MakerHub LINX by following the in depth instructions and video guide found here.

Once you have finished installation of LINX, determine what port the WF32 is connected to by opening the control panel, clicking on device manager, and then expanding the Ports (COM & LPT) menu (pictured above). A video of this is also found in the link above if you're having trouble.

Next, open LabVIEW and open the attached LINX Demo1 VI. On the front panel, select the serial port that corresponds to the WF32 that you found in the device manager. Now, under the digital channels array, make the first entry 65 and the second entry 66. These values correspond to digital channels 65 and 66 respectively which are the two digital channels for the two on-board buttons located on the WF32. Button 1 is digital channel 65 and button 2 is 66. Refer to the attached picture for the physical location of button 1 and 2 on the WF32.

Step 3: LabVIEW Code

This VI monitors digital channels 65 and 66 and reports whether they are being pushed with a true/false output. The values are stored in an array so the index array block is used to reach each digital channel individually and send the true/false value into a case structure. If a button is pushed, LabVIEW goes to the indicated URL connected to the Get HTTP block. Then the match regular expression function is used to look for a specific part of the string that contains the desired information. Then this string is processed so that the extra characters in the string located before and after the actual information you want are ignored.

Run the VI and press and hold a button to display either the current weather or your current location.

Let me know what you think or if you have any questions.