Line 7: Line 7:
  
 
=Hook Up=
 
=Hook Up=
 +
 +
==Code to Read Voltage==
 +
<html>
 +
<script src="https://gist.github.com/Xplorer001/d46092fcad54a3b628f0.js"></script>
 +
</html>
 +
 +
==Code to Read Temperature==
 +
<html>
 +
<script src="https://gist.github.com/Xplorer001/b5324c706391fa1e4a77.js"></script>
 +
</html>

Revision as of 13:19, 5 April 2016

In this tutorial we will set up and read the temperature from LM35 using ADC of Atmega32 AVR breakout.

Basics

Initially we will read a raw data from ADC. Atmega32 comes with 10-bit 8-channel inbuilt ADC. We will connect 10k Pot to channel 0, vary it and read the raw voltage. After that we will connect the LM35 temperature sensor to channel 0 and read the temperature as shown in Hook up. We will display the converted value on Terminal.
Refer Reading Temperature with AVR ADC for basics of Atmega32 ADC and LM35 temperature sensor.

Hook Up

Code to Read Voltage

Code to Read Temperature