- 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.
推薦閱讀
- Web程序設(shè)計及應(yīng)用
- Spring技術(shù)內(nèi)幕:深入解析Spring架構(gòu)與設(shè)計
- 騰訊iOS測試實踐
- 嚴密系統(tǒng)設(shè)計:方法、趨勢與挑戰(zhàn)
- C語言程序設(shè)計學(xué)習(xí)指導(dǎo)與習(xí)題解答
- OpenStack Orchestration
- Oracle 18c 必須掌握的新特性:管理與實戰(zhàn)
- Learning Unity 2D Game Development by Example
- Mastering Git
- Hands-On Full Stack Development with Spring Boot 2.0 and React
- Python+Office:輕松實現(xiàn)Python辦公自動化
- The Statistics and Calculus with Python Workshop
- Java高級程序設(shè)計
- IBM RUP參考與認證指南
- 少兒編程輕松學(xué)(全2冊)