Temperature sensors are used in a wide range of electronic devices, including digital thermometers, home thermostats, ovens, and refrigerators. Figure 1 shows two devices with temperature sensors.
The temperature sensor provided in your kit is a precision analog sensor, whose voltage output is linearly proportional to the temperature. Configured as described here, the sensor has an operating range of about 0°C to +150°C.

The temperature sensor is a three-pin integrated circuit. When the device's flat side is facing towards you, the three pins are labeled 1, 2, and 3, from left to right, as shown in Figure 2.
Depending on your kit, you may have either an LM35 temperature sensor or an LM335 temperature sensor. You can identify your sensor by reading the text on the flat face of the device, as shown in Figure 3. The two sensors are wired slightly differently on the breadboard and produce different analog outputs, so it is critical to identify which type you have before moving ahead.
Reading and Plotting Temperature Data
Using MATLAB, it is possible to plot data gathered from the ATmega microcontroller. Using the ms.adc_read command, you can have MATLAB gather data from the temperature sensor and display the temperature over time as an x-y graph.

>> data=ms.adc_read(4); %Set data equal to temperature value
>> data %Display the current value for the temperature
2. Write a program in the editor window to plot the data from the temperature sensor:
delete(ms)
endms=msci.breadboardkit('COM#') %Connect to com port
msdefines %Ensure you have ms objects
for i=1:60 %Start a loop with 60 cycles
pause(1) %Pause for 1 second
data=ms.adc_read(4) %Read the analog value
plot(i, data, 'rs') %Plot the iteration and the value
drawnow %Draw all points plotted so far
hold on %Keep the same graph on the screen
axis([0 60 0 40]) %Set the x and y axis extentsend
xlabel('Time (s)'); %Label the x axis as Time
ylabel('Analog Value'); %Label the y axis as Analog Value
Related projects
Spectrum Analyzer using TMS320F28023DA with Proteus Simulation
Introduction This project demonstrates a real-time audio spectrum analyzer using the TMS320F28023DA Piccolo microcontroller, simulated in Proteus VSM. The system captures an...
Sensors & TemperatureDHT22 Low Cost Humidity Sensor using PIC18F25K20 with Proteus Simulation
IntroductionThis microcontroller project demonstrates how to interface a DHT22 (RHT03) digital temperature and humidity sensor with a PIC18F25K20 using Proteus simulation.The project...
Sensors & TemperatureCrafting a Microcontroller-Based Temperature Monitoring System
Abstract As technological advancements progress, processes become increasingly intricate, demanding a corresponding expansion in the parameters necessary for efficient analysis. Data acquisition,...
Sensors & TemperatureAutomated Room Temperature Monitoring System using Microcontrollers
Abstract Monitoring the temperature within a computer server room stands as a crucial responsibility to uphold the server's performance amidst potential disruptions...
Sensors & TemperatureInnovative Approaches to Control System Design for 100KV Impulse Generators
1. INTRODUCTION An impulse generator is an electrical device designed to generate short-duration surges of high voltage or high current. Impulse signals...
Sensors & TemperatureSmart Baby Incubator: Enhancing Care with PIC Microcontrollers
INTRODUCTION Within the effective Baby Incubator system, the incubator serves as an infant-stimulation apparatus designed for the intensive care of newborns, particularly...