- 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:

推薦閱讀
- Hands-On Data Structures and Algorithms with Rust
- 企業數字化創新引擎:企業級PaaS平臺HZERO
- Architects of Intelligence
- 智能數據分析:入門、實戰與平臺構建
- 智能數據時代:企業大數據戰略與實戰
- SQL優化最佳實踐:構建高效率Oracle數據庫的方法與技巧
- Oracle PL/SQL實例精解(原書第5版)
- SQL應用及誤區分析
- Unity 2018 By Example(Second Edition)
- 區塊鏈+:落地場景與應用實戰
- SIEMENS數控技術應用工程師:SINUMERIK 840D-810D數控系統功能應用與維修調整教程
- Node.js High Performance
- Oracle 11g數據庫管理員指南
- 領域驅動設計精粹
- 成功之路:ORACLE 11g學習筆記