Interfacing of temperature sensor LM35 with Arduino

Procedure

  • Source
  • Target

NOTE: First make the connections, then move to code compilation.

1. Drag and drop the components in the workspace to create the circuit.

2. Connect Pin(Vcc) of LCD with Pin2 of breadboard.

3. Connect Pin(Gnd) of LCD with Pin1 of breadboard.

4. Connect Pin(SCL) of LCD with PinA4 of breadboard.

5. Connect Pin(SDA) of LCD with PinA5 of breadboard.

6. Connect Pin(Vcc) of LM35 with Pin4 of BreadBoard.

7. Connect Pin(Gnd) of LM35 with Pin3 of BreadBoard.

8. Connect Pin(Vo) of LM35 with Pin(A1) of Arduino.

9. Connect Pin5 of Breadboard with GND Pin of Arduino..

10. Connect Pin6 of Breadboard with Pin(5V) pin of Arduino..

11. After connections click on the CHECK button to check the connections.

NOTE: Right click on the component to open the dialog box to edit the properties of the component.

12. For the code compiler:

  • Set float millivolts = ________ as “sensorValue” first.
  • Set float temperatureC = ________ as “millivolts”.

13. Now, click on COMPILE button to compile the code.

14. Click on RESET button to reload the webpage