Temperature on GUI using visual studio and arduino

In this post, first we will interface LM35 with arduino uno and then  upload this data through serial communication. With the help of visual studio we can make computer gui application and though this gui application, we can do lot of stuffs like temperature logger, humidity monitoring. The

Stuff we require:

  1. Arduino uno with usb cable
  2. LM35
  3. Jumper wires
  4. Visual Studio (I had used VS 2012)
Make connections as follows:

LM35 interfacing with arduino


Simply provide, Vcc and GND to temperature sensor (LM35) and it's output should be connected to A0 of arduino. You can connect it to any channel from A0 to A5.

Calculation part:

There is little bit calculation. LM35 gives analog output. It's linearity is 10 mV/°C
which literally means for rise in temperature of 1°C, there be an increment of mV from output of lm35. It's graph is linear. It's temperature range is from: -55°C to +150°C.
Since, we are using LM35 it is calibrated in terms of degree celsius. There are other variants available like lm235 and lm335.

Arduino Code: 

The code is very simple

/*
Code Starts
*/


float val=0.0;

void setup() {
Serial.begin(9600);
}

void loop() 
{
val=analogRead(A0);
val=(0.4887*val);
Serial.println("VALUE OF TEMPERATURE IS: " + String(val) );
delay(1500);
}

/*
Code Ends
*/

Check out the video:


Visit this blog for more updates !!








[original story: FunWithElectronics]