Archivo de la categoría: LABVIEW + ARDUINO

PRACTICE 1 – TEMPERATURE AND MOTOR CONTROL WITH LIGHT

This exercise consists, on one hand, on reading a temperature sensor (LM35) and show the real temperature with a graph, and in the other hand, consists on reading a visible light sensor to control a DC motor with LabView and Arduino Uno board.

First, when you connect the Arduino Uno board, you have to load the LIFA_Base.ino sketch located on C:\Program Files (x86)\National Instruments\LabVIEW 2012\vi.lib\LabView Interface for Arduino\Firmware\LIFA_Base. When the program were loaded in the Arduino Uno board, you could start using LabView to program Arduino.

So open a blank VI and use the ARDUINO palette to start programming the block diagram. First use the INIT instruction to open the resource. Then, in a while loop, I use two instructions: READ ANALOG PIN and PWM WRITE PIN. First I read the temperature in the Analog PIN 4, then I read the light sensor in the Analog PIN 2, and at the end I write the sensor measure with a PWM in the Digital PIN 9. To finish, and out of the while loop, I end the program with the CLOSE instruction.

Here is a pic of the block diagram:

Imagen

And this is the Front Panel view:

Imagen1

To download the VI,

CLICK HERE –>                                                                                                           https://mega.co.nz/#!KoxzRaiD!iq2JGDa14ZEzBjA_HEp52vVvzUkjLr-K9b2R_97Mr0g

Anuncios