mBlock 單元二:控制 LED 燈亮度 (mBlock Unit 2: Controlling the LED lightness)
1 min readNov 20, 2018
LED燈不是只有亮與滅而已,透過 PWM 的方式也可以控制亮度,首先麵包板電路接線如下:
硬體材料:
- Arduino UNO R3 板子 x 1
- LED 燈 x 1
- 220 歐姆電阻 x 1
- 公對公杜邦線 x 2
- 麵包板 x 1
mBlock 程式積木如下:
Demo影片:
參考資料:
Originally published at yunlinsong.blogspot.com on November 20, 2018.