- 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.
推薦閱讀
- Mobile Web Performance Optimization
- SOA實踐
- 算法訓練營:入門篇(全彩版)
- Java 9 Programming Blueprints
- Java軟件開發基礎
- Spring實戰(第5版)
- 正則表達式經典實例(第2版)
- Mathematica Data Analysis
- 組態軟件技術與應用
- ServiceNow:Building Powerful Workflows
- Penetration Testing with the Bash shell
- Java程序設計教程
- Visual C++開發寶典
- Using Yocto Project with BeagleBone Black
- Less Web Development Cookbook