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

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.

主站蜘蛛池模板: 轮台县| 织金县| 五峰| 灯塔市| 铜山县| 芒康县| 玛沁县| 奈曼旗| 临漳县| 晋宁县| 平山县| 集安市| 峨眉山市| 筠连县| 锡林浩特市| 祁东县| 项城市| 都兰县| 大埔县| 微博| 灯塔市| 古田县| 磐石市| 长海县| 普格县| 武汉市| 明星| 错那县| 黄梅县| 卓尼县| 慈溪市| 珠海市| 和林格尔县| 杭锦旗| 游戏| 宜黄县| 博客| 丘北县| 耒阳市| 黄大仙区| 漯河市|