mBlock 單元五:使用光敏電阻控制 LED 燈亮度 ( mBlock Unit 5: Controlling a LED lightness with a photoresistor )
2 min readNov 20, 2018
現在的智慧型手機都有自動調整螢幕亮度的功能,手機裡頭就有個偵測光強度的感測器(Light Sensor),此範例就是模擬手機自動調整螢幕背光的功能。
電路圖如下:
硬體材料:
1. Arduino UNO R3 板子 x 1
2. 公對公杜邦線 x 7
3. LED燈 x 1
4. 220歐姆電阻 x 2
5. 光敏電阻 x 1
mBlock程式積木如下:
示範影片:
參考資料:
Originally published at yunlinsong.blogspot.com on November 20, 2018.