Skip to content

Commit d2ae6a6

Browse files
committed
cover image and code for LM35 Temperature Sensor with Arduino
1 parent 09b7831 commit d2ae6a6

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# [Interfacing Basic Sensor Module With Arduino](https://circuitdigest.com/tags/arduino)
2+
3+
<img src="https://github.com/Circuit-Digest/Basic-Arduino-Tutorials-for-Beginners-/blob/main/Interfacing%20IR%20Sensor%20Module%20with%20Arduino/images/IR-Sensor-Cover.jpg" width="" alt="alt_text" title="image_tooltip">
4+
<br>
5+
6+
<br>
7+
<a href="https://circuitdigest.com/tags/arduino"><img src="https://img.shields.io/static/v1?label=&labelColor=505050&message=Arduino Basic Tutorials Circuit Digest&color=%230076D6&style=social&logo=google-chrome&logoColor=%230076D6" alt="circuitdigest"/></a>
8+
<br>
9+
10+
[<h1>Click here](https://circuitdigest.com/tags/arduino) for the complete tutorials on Arduino basics.</h1>
11+
12+
13+
<br>
14+
<br>
15+
Hello everyone, this repository contains the resource files for basic Arduino Tutorials. If you are interested to know more about Arduino, then You can visit the following links.
16+
<br>
17+
[Note: As this projects are very simple we are only providing the code, schemaitic, and a few essential images if you want to get the images or code explanations do check out the links given below.
18+
<br>
19+
<br>
20+
21+
22+
23+
**Other Basic Arduino Tutorial by Circuit Digest**
24+
25+
<br>
26+
<br>
27+
28+
✅Tutorial 1:[Interfacing IR Sensor Module with Arduino](https://github.com/Circuit-Digest/Basic-Arduino-Tutorials-for-Beginners-/tree/main/Interfacing%20IR%20Sensor%20Module%20with%20Arduino)
29+
<br>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// LM35 is connected to this PIN
2+
#define sensorPin A0
3+
4+
void setup() {
5+
// Init serial at 9600 baud
6+
Serial.begin(9600);
7+
}
8+
9+
void loop() {
10+
//Read Raw ADC Data
11+
int adcData = analogRead(sensorPin);
12+
13+
// Convert that ADC Data into voltage
14+
float voltage = adcData * (5.0 / 1024.0);
15+
16+
// Convert the voltage into temperature
17+
float temperature = voltage * 100;
18+
19+
// Print the temperature data
20+
Serial.print("Temperature: ");
21+
Serial.print(temperature);
22+
Serial.println("*C");
23+
24+
25+
delay(800); // wait a second between readings
26+
}
Loading

0 commit comments

Comments
 (0)