5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



ARDUBLOCK Project 13: LM35 Temperature Sensor

Posted by Fiona Su on

Introduction:
LM35 is a common and easy-to-use temperature sensor.
In this project, we use graphical programming to read out analog value of temperature measured by LM35 temperature sensor module. Then after a serials of calculation we get specific temperature value. Finally display the value on serial monitor.
Materials Required:

  • 1. KEYESTUDIO UNO Control Board *1
  • 2. V5 Sensor Shield*1
  • 3. LM35 Temperature Module*1
  • 4. Female to Female Dupont Line*3

Connection Diagram:
Let’s start experiment, and connect ultrasonic waves to ARDUINO referring to the following figure.

thumb

thumb

After wiring, we can start programming.

thumb

Click “download to Arduino” to see the following codes in ARDUINO programming interface:
Sample Code:

*****************************************************************************
int _ABVAR_1_val = 0 ;
int _ABVAR_2_dat = 0 ;

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

void loop()
{
  _ABVAR_1_val = analogRead(0) ;
  _ABVAR_2_dat = ( ( 5 * _ABVAR_1_val ) / 10 ) ;
  Serial.print("TEMP=");
  Serial.print(_ABVAR_2_dat);
  Serial.println();
  delay( 100 );
}
*******************************************************************************

Result:
After the program is downloaded, you can open the serial monitor to see current temperature.

thumb

All Projects

Buy it >> ARDUBLOCK Graphical Programming Starter Kit for Arduino

0 comments

Leave a comment

Please note, comments must be approved before they are published