mBlock 單元二:控制 LED 燈亮度 (mBlock Unit 2: Controlling the LED lightness)

Ping-Lun Liao
1 min readNov 20, 2018

--

LED燈不是只有亮與滅而已,透過 PWM 的方式也可以控制亮度,首先麵包板電路接線如下:

硬體材料:

  1. Arduino UNO R3 板子 x 1
  2. LED 燈 x 1
  3. 220 歐姆電阻 x 1
  4. 公對公杜邦線 x 2
  5. 麵包板 x 1

mBlock 程式積木如下:

Demo影片:

參考資料:

[1] mBlock & Arduino(2)點亮外接 LED

[2] mBlock & Arduino(4)利用 PWM 模擬類比訊號

Originally published at yunlinsong.blogspot.com on November 20, 2018.

--

--

No responses yet