Alma García

 

WEEK 11

 

WEEK ASSIGNMENT:

 

INPUT DEVICES

 

 

 

LM35 is a temperature sensor calibrated to an accuracy of 1 ° C . Its measurement range is from -55 ° C to 150 ° C . The output is linear and each degree Celsius equals 10 mV , thus : C = 1500 mV 150 .

 

I chose a temperature sensor being an entry that collects and processes environmental data as is the temperature.

 

An analog temperature sensor such as LM35 increases the level of the voltage reaching the plate in proportion to the temperature.

 

 

INPUT:

To store the two possible values ​​LOW or HIGH in a variable called "reading"

 

I did a little exercise to measure room temperature and display it on my PC. The assembly did not take more than a couple of minutes and we could see the scheme clearly. The leg Vs + 5V pin goes to the Vout leg to pin we use for reading, in this case 0, and the remaining GND to GND . Keep in mind that the drawing is made LM35 view from the legs

 

 

To store the temperature we used the following variable:

 

 

>float temperature ; // Store the value read here

pinentrada int = 0; // Use the pin A

To communicate from your computer to the controller so you can display the data on screen.

 

>And the code  looks like

 

void loop ()

 

    temperature = analogRead ( pinentrada ) ; // Reading pin A0

    temperature = (temperature / 1023 * 5 / 0.01) ; // "Translates" the value read degrees

    Serial.print (temperature ) ; // Write the value of the temperature through the serial port

    Serial.print ( " Celsius degrees \ n"); // Write units

    delay ( 1000 ) ; // Wait one second

 

 

We loaded the code on the plate and we just had to click on the  serial monitor icon

 

 

 

 

 

 

This temperature sensor was used for my final project