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

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.

主站蜘蛛池模板: 南乐县| 积石山| 西乡县| 崇信县| 东莞市| 昌图县| 醴陵市| 延安市| 徐州市| 当雄县| 泗水县| 保山市| 体育| 淮北市| 青海省| 九台市| 古蔺县| 水城县| 灵石县| 汾阳市| 额济纳旗| 齐河县| 普宁市| 桐柏县| 邻水| 松潘县| 淮阳县| 永定县| 霍邱县| 石嘴山市| 淮北市| 清水县| 丹巴县| 托克托县| 延寿县| 日喀则市| 六枝特区| 灵川县| 衡阳县| 克什克腾旗| 米脂县|