Skip to content

Commit 715c01e

Browse files
committed
images and code for ds18b20 temperature sensor
1 parent 596277b commit 715c01e

File tree

5 files changed

+97
-0
lines changed

5 files changed

+97
-0
lines changed

Diff for: DS18b20 Temperature Sensor with Arduino/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# [Interfacing 16x2 LCD with Arduino](https://circuitdigest.com/microcontroller-projects/interfacing-16x2-lcd-with-arduino)
2+
3+
<img src="https://github.com/Circuit-Digest/Basic-Arduino-Tutorials-for-Beginners-/blob/d72d720d083c663016516b760d49e7d76e152fe6/Interfacing%2016x2%20LCD%20with%20Arduino/Image/16x2-LCD_Title-image.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+
<br>
16+
In this digital age, we come across LCDs all around us from simple calculators to smartphones, computers and television sets etc. The LCDs use liquid crystals to produce images or texts. The LCDs are categorized into different categories based on different criteria like type of manufacturing, monochrome or colour, and weather Graphical or character LCD. In this tutorial, we will be talking about the 16X2 character LCD Modules.
17+
<br>
18+
The 16x2 LCDs are very popular among the DIY community. Not only that you can also find them in many laboratory and industrial equipment. It can display up to 32 characters at a time. Each character segment is made up of 40 pixels that are arranged in a 5x8 matrix. We can create alphanumeric characters and customs characters by activating the corresponding pixels. Here is a vector representation of a 16x2 LCD, in which you can see those individual pixels.
19+
<br>
20+
[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 Circuit Digest website.
21+
<br>
22+
<br>
23+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Include the libraries we need
2+
#include <OneWire.h>
3+
#include <DallasTemperature.h>
4+
5+
// Data wire is plugged into port 2 on the Arduino
6+
#define ONE_WIRE_BUS 2
7+
8+
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
9+
OneWire oneWire(ONE_WIRE_BUS);
10+
11+
// Pass our oneWire reference to Dallas Temperature.
12+
DallasTemperature sensors(&oneWire);
13+
14+
/*
15+
* The setup function. We only start the sensors here
16+
*/
17+
void setup(void)
18+
{
19+
// start serial port
20+
Serial.begin(9600);
21+
Serial.println("Dallas Temperature IC Control Library Demo");
22+
23+
// Start up the library
24+
sensors.begin();
25+
}
26+
27+
/*
28+
* Main function, get and show the temperature
29+
*/
30+
void loop(void)
31+
{
32+
// call sensors.requestTemperatures() to issue a global temperature
33+
// request to all devices on the bus
34+
Serial.print("Requesting temperatures...");
35+
sensors.requestTemperatures(); // Send the command to get temperatures
36+
Serial.println("DONE");
37+
// After we got the temperatures, we can print them here.
38+
// We use the function ByIndex, and as an example get the temperature from the first sensor only.
39+
float tempC = sensors.getTempCByIndex(0);
40+
41+
// Check if reading was successful
42+
if(tempC != DEVICE_DISCONNECTED_C)
43+
{
44+
Serial.print("Temperature for the device 1 (index 0) is: ");
45+
Serial.println(tempC);
46+
}
47+
else
48+
{
49+
Serial.println("Error: Could not read temperature data");
50+
}
51+
}
150 KB
Loading
Loading

Diff for: Sound Sensor with Arduino/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# [Interfacing 16x2 LCD with Arduino](https://circuitdigest.com/microcontroller-projects/interfacing-16x2-lcd-with-arduino)
2+
3+
<img src="https://github.com/Circuit-Digest/Basic-Arduino-Tutorials-for-Beginners-/blob/d72d720d083c663016516b760d49e7d76e152fe6/Interfacing%2016x2%20LCD%20with%20Arduino/Image/16x2-LCD_Title-image.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+
<br>
16+
In this digital age, we come across LCDs all around us from simple calculators to smartphones, computers and television sets etc. The LCDs use liquid crystals to produce images or texts. The LCDs are categorized into different categories based on different criteria like type of manufacturing, monochrome or colour, and weather Graphical or character LCD. In this tutorial, we will be talking about the 16X2 character LCD Modules.
17+
<br>
18+
The 16x2 LCDs are very popular among the DIY community. Not only that you can also find them in many laboratory and industrial equipment. It can display up to 32 characters at a time. Each character segment is made up of 40 pixels that are arranged in a 5x8 matrix. We can create alphanumeric characters and customs characters by activating the corresponding pixels. Here is a vector representation of a 16x2 LCD, in which you can see those individual pixels.
19+
<br>
20+
[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 Circuit Digest website.
21+
<br>
22+
<br>
23+

0 commit comments

Comments
 (0)