- Hands-On Robotics Programming with C++
- Dinesh Tavasalkar
- 130字
- 2021-06-24 15:30:33
Wiring connection
With a wiring connection, we can connect the LDR sensor module and a LED to the RPi:

The wiring connections are as follows:
- wiringPi pin 8 of the RPi is connected to the D0 pin of the LDR sensor module
- Physical pin 2 of the RPi is connected to the Vcc pin of the LDR sensor module
- Physical pin 6 of the RPi is connected to the Gnd pin of the LDR sensor module
- wiringPi pin 0 is connected to the positive pin of the LED
- Physical pin 14 is connected to the negative pin of the LED
Now that we have connected the LDR sensor module and LED to the RPi, let's write the program to turn the LED on/off by taking inputs from the LDR sensor.
推薦閱讀
- 數據結構和算法基礎(Java語言實現)
- MySQL數據庫應用與管理 第2版
- 程序員面試算法寶典
- PostgreSQL技術內幕:事務處理深度探索
- Production Ready OpenStack:Recipes for Successful Environments
- 重學Java設計模式
- ASP.NET程序設計教程
- Apache Spark 2.x for Java Developers
- Working with Odoo
- Java網絡編程實戰
- Babylon.js Essentials
- 基于SpringBoot實現:Java分布式中間件開發入門與實戰
- Java Web從入門到精通(第2版)
- Practical GIS
- DB2SQL性能調優秘笈