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

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.

主站蜘蛛池模板: 谢通门县| 凤阳县| 思南县| 鹤峰县| 卫辉市| 六安市| 故城县| 临沧市| 天台县| 铁岭市| 和硕县| 安阳市| 平定县| 石家庄市| 莱州市| 玉山县| 井陉县| 成武县| 江川县| 浦东新区| 年辖:市辖区| 习水县| 昌平区| 永春县| 吴川市| 百色市| 邛崃市| 宁津县| 咸宁市| 鹤壁市| 海安县| 乐平市| 云龙县| 北海市| 广东省| 潮州市| 五莲县| 威远县| 天峻县| 新郑市| 鄂托克旗|