• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomeScratchSynthesize Color by RGB LEDs (B) (Scratch for pcD ...
Previous Next

Synthesize Color by RGB LEDs (B) (Scratch for pcDuino)

Posted by: admin , May 18, 2014

[vc_row][vc_column][vc_column_text]This is a post following the previous one: http://learn.linksprite.com/scratch/synthesize-color-by-rgb-leds-a-scratch-for-pcduino/

灯亮[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Part list” tab_id=”1400209985-1-28″][vc_column_text]

  1. 1  x  pcDuino
  2. 3  x  LED Module of Linker Kit for pcDuino/Arduino ( RED, YELLOW,BLUE Respectively)
  3. 3  x   20 cm cable for Linker Kit
  4. 1  x Linker base

[/vc_column_text][/vc_tab][vc_tab title=”Script” tab_id=”1400209985-2-93″][vc_column_text]1. Choose the Script , then click the script啊, to draw the Red LED script, as the follows

2. Set the initial state of the Red LED

红灯初始状态

When the green flag is clicked, the costumer 1 is hollow, then the set of red light is  off

3. when the role 1 is clicked, switch to the next costumer, so you can switch back and forth from both costumers, when costumer 2 turn on ,so  set High

Or the costumer 1 is off, so setlow

红灯初始状态2

4.The control principles of the three LED are the same, so copy these script  to  role 2 and  role 3.

黄灯代码 蓝灯代码

Note: after you copy the script to role 2 and role 3 you need to change the pin port

 

 

[/vc_column_text][/vc_tab][vc_tab title=”Result” tab_id=”1400210331175-2-1″][vc_column_text]When you click the green flag

效果图 没亮

 

After you click the edge of the LED,you will see

效果图全亮 IMG_0322[/vc_column_text][/vc_tab][vc_tab title=”Download” tab_id=”1400474143213-3-3″][vc_column_text]Project files[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: Scratch

Share!
Tweet

admin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors