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

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.

主站蜘蛛池模板: 辉南县| 敖汉旗| 大丰市| 阳泉市| 花莲县| 临猗县| 沁水县| 永济市| 宜兴市| 思南县| 凌源市| 泾源县| 中山市| 镇原县| 苍南县| 五莲县| 措勤县| 阿坝| 阳春市| 临洮县| 遂川县| 长乐市| 永福县| 德阳市| 应用必备| 孟州市| 博罗县| 潍坊市| 桂阳县| 嘉鱼县| 镶黄旗| 南汇区| 阜阳市| 泰州市| 锡林浩特市| 垦利县| 漳平市| 桦川县| 凤阳县| 青州市| 九台市|