lunes, 2 de junio de 2014

(labVIEW + Arduino) Temperature and motor control with light

Here i am going to explain how to make a program with labVIEW where we can control a motor with a light sensor and how to measuring temperature with Arduino UNO.

At first we have to open Arduino resource where we will configurate the COM, baud speed, board type (Arduino UNO in this case), bytes per packet and connection type (USB).

The next step is set the digital pin mode, in this case PIN3 OUTPUT.

In the first part of program I read the A2 pin and do a rule of three for input Duty Cycle on pin D3 as the A2 gives me the output in a range of 0 to 100, and Duty Cycle has an input range of 0 to 255.















In the second part, I read pin A4 (temperature sensor) and collect 10 samples to make a rule of three and thus achieve greater efficiency and multiply x100 because the voltage which gives the temperature sensor is given in mV.

To finish, close resource.

And this is the front panel, where we can see the temperature and motor speed.











No hay comentarios:

Publicar un comentario