官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 青阳县| 长海县| 依安县| 九龙坡区| 定结县| 汝州市| 新巴尔虎左旗| 黔江区| 合肥市| 赤峰市| 双流县| 佛山市| 上犹县| 兴国县| 民权县| 察哈| 东源县| 西林县| 泽库县| 即墨市| 萨迦县| 宣城市| 龙泉市| 罗江县| 高尔夫| 双鸭山市| 潼关县| 灵宝市| 谢通门县| 龙南县| 藁城市| 五莲县| 大同市| 新巴尔虎右旗| 密云县| 灌云县| 汝阳县| 西华县| 营山县| 永定县| 抚顺市|