Arduino 生氣指數 LED 燈
本文使用TinkerCAD Circuits來示範聲音感測器的應用:「生氣指數」,聲音越大LED就越亮也越多顆。
Sound sensor application: “Sound triggered LED”. This sound level to control the number of LEDs. The higher the sound level, the more LEDs are on.
材料(Materials):
1. Arduino UNO R3 板子 x 1
2. 聲音感測器模組 Sound sensor x 1
3. LED 燈 x 4
4. 杜邦線公對公 male/male jumper wire x 8
5. 220歐姆電阻 220 ohm resistor x 4
6. 麵包板 Breadboard x 1
電路(Circuit):
上圖是用Photentiometer表示聲音感測器模組。
Sound sensor signal pin is wired to Arduino UNO A0.
The LEDs’ anodes are wired to Arduino UNO pin 3, 5, 6, 9, respectively.
程式碼(The Code):
示範影片(Demo Video):
範例連結(Example Link):
Originally published at yunlinsong.blogspot.com on February 3, 2019.