- 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.
推薦閱讀
- PostgreSQL for Data Architects
- Learning Chef
- C++ Builder 6.0下OpenGL編程技術(shù)
- Django開發(fā)從入門到實(shí)踐
- Python Game Programming By Example
- Android 9 Development Cookbook(Third Edition)
- Podman實(shí)戰(zhàn)
- Securing WebLogic Server 12c
- Clojure Reactive Programming
- Spring 5 Design Patterns
- Mockito Essentials
- DevOps 精要:業(yè)務(wù)視角
- MongoDB Administrator’s Guide
- Learning D3.js 5 Mapping(Second Edition)
- 程序員的英語