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

Smart light – working with digital sensor

After writing our first C/C++ program for Raspberry Pi, we can now write a program that will take input from an LDR sensor and turn the LED on or off. For this project, you will need the following hardware components:

  • 1 LDR sensor module
  • 1 LED
  • Raspberry Pi
  • 5 female-to-female connecting wires

First, let's explore how the LDR sensor works.

主站蜘蛛池模板: 大渡口区| 天等县| 安图县| 宜黄县| 新巴尔虎右旗| 平昌县| 景洪市| 凤山市| 兴宁市| 普格县| 连江县| 大埔区| 泸西县| 哈巴河县| 哈巴河县| 恩施市| 安达市| 克拉玛依市| 阳谷县| 奉新县| 正镶白旗| 阳春市| 皋兰县| 招远市| 易门县| 万年县| 仁化县| 临潭县| 九台市| 泗阳县| 南城县| 九台市| 桦川县| 定远县| 汪清县| 忻州市| 烟台市| 德令哈市| 保山市| 新巴尔虎左旗| 阜宁县|