- Internet of Things Programming with JavaScript
- Rubén Oliva Ramos
- 152字
- 2021-04-02 20:31:19
Connectting digital input - sensor DS18B20
The Raspberry Pi has digital pins, so in this section, we will look at how to connect a digital sensor to the board. We will use the digital sensor DS18B20, which has a digital output and can be perfectly connected to a digital input in our Raspberry Pi sensor. The main idea is to take temperature readings from the sensor and display them on the screen.
Hardware requirements
We will require the following hardware to take the temperature reading:
- Temperature sensor DS18B20 (waterproof)
- One resistor of 4.7 kilo-ohms
- Some jumper wires
- A breadboard
We will use a waterproof sensor DS18B20 and a 4.7 kilo-ohm resistor:

This is the waterproof sensor that we are using in this project.
Hardware connections
The following diagram shows the circuit on the breadboard, with the sensor and the resistor:

In the following image, we can see the circuit with the sensor:

推薦閱讀
- Microsoft SQL Server企業級平臺管理實踐
- 從0到1:數據分析師養成寶典
- 城市計算
- 數據革命:大數據價值實現方法、技術與案例
- 跨領域信息交換方法與技術(第二版)
- R Object-oriented Programming
- Expert Python Programming(Third Edition)
- Access數據庫開發從入門到精通
- 數據挖掘競賽實戰:方法與案例
- Deep Learning with R for Beginners
- Node.js High Performance
- 大數據分析:R基礎及應用
- Artificial Intelligence for Big Data
- 工業大數據融合體系結構與關鍵技術
- 數據中心UPS系統運維