2017年11月14日 星期二

Micro:bit 進行物理顏色實驗

The primary color of light consists Red, Green, Blue, so it would be easy to demo the light combination using RGB LED.

Required:
RGB LED (4PIN)
Micro:bit
Micro:bit Breakout Board

Connect R, G, B, GND Pin to P0, P1, P2, GND respectively.

Code:
 https://makecode.microbit.org/_HvJc5W8jo8P0


It shows:
Red + Green = Yellow
Green + Blue = Cyan
Blue + Red = Magenta
Red + Green + Blue = White


 






Further development should be the demo of different color light level.

沒有留言:

Free Photo to 4R Certificate Photo

https://onsir.org/photo.php