Getting Started with the Interactions Parts Kit, Part 1

With the LabVIEW Interaction Parts Kit coming out soon, I decided to create some very simple projects to help new LabVIEW and electronics users.  These projects use LabVIEW, the LabVIEW Interaction Parts Kit, a microcontroller, and LabVIEW MakerHub LINX.  LINX allows LabVIEW to interact with your microcontroller.

Check out this Instructable to see how to get started with LabVIEW MakerHub LINX. If you have LabVIEW Home Bundle, check out this Instructable with in-depth instructions on how to install it on your computer. If you want to purchase LabVIEW Home Bundle and a chipKIT WF32, check out the LabVIEW Physical Computing Kit!

For my first project using the LabVIEW Interaction Parts Kit, I used a potentiometer to control the brightness of an LED. Also, I used a tilt switch in series with the LED so that when the breadboard is upright, the LED will light up, but when the breadboard is flipped sideways or upside-down it will turn the LED off.  If you’re interested in an in-depth guide, check out my Instructable.

FKKV1C5IFR65O2Y.MEDIUM

In the first part of the guide, I explain how to read the values from the potentiometer using LabVIEW MakerHub LINX and the chipKIT WF32.  Above is a picture of the potentiometer setup and a picture of the LabVIEW VI is below.  Using our analog voltage values from the potentiometer, we can create a pulse wave modulation (PWM) value to control the brightness of the LED.

poten

The next step is to add the tilt switch and the LED. PWM is used to simulate an analog voltage value to light up the LED.  Since the voltage reading from our potentiometer ranges from 0V to 3.3V, we simply take the voltage reading and divide it by 3.3 to create a PWM duty cycle ranging from 0 (0%) to 1 (100%).  Thus when the potentiometer wiper voltage is 3.3V, our PWM duty cycle is 1 and our LED is the brightest.  Because the PWM block in LabVIEW only takes duty cycle values from 0 to 1, we also add in a “In Range and Coerce” block in order to limit the values to the range 0 to 1.  Check out the LabVIEW VI below for the finished project.

fin

For other LabVIEW projects, check out my Instructables here.  Stay tuned for more projects with the LabVIEW Interaction Parts Kit to help you become the next LabVIEW master.

 

Be the 1st to vote.

One Comment on “Getting Started with the Interactions Parts Kit, Part 1”

Leave a Reply

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