Difference between revisions of "Force Sword"
(Created page with "{| style="width: 1000px;" |- | ==Outline== 600px|center Let’s make a force sword, which will light up gradually when we hold the hilt. <br> Su...") |
|||
Line 6: | Line 6: | ||
[[File:anywhere_sword.jpg|600px|center]] | [[File:anywhere_sword.jpg|600px|center]] | ||
− | + | Let's make a force sword, which will light up gradually when we hold the hilt. | |
<br> | <br> | ||
Suitable kits: mCookie302, IBC | Suitable kits: mCookie302, IBC | ||
Line 45: | Line 45: | ||
==Programming== | ==Programming== | ||
===Required Program Blocks=== | ===Required Program Blocks=== | ||
− | *[[ | + | *[["ColorLED prepare" program block]] |
− | *[[ | + | *[["ColorLed control adjust RGB" program block]] |
− | *[[ | + | *[["Every time" program block]] |
− | *[[ | + | *[["Waiting" program block]] |
− | *[[ | + | *[["Delay" program block]] |
===Programming Thought=== | ===Programming Thought=== | ||
− | ColorLED prepare, wait for the touch sensor to be pressed, and make the | + | ColorLED prepare, wait for the touch sensor to be pressed, and make the "every time" program block light up gradually. |
[[File:mixly-ctrl-sword.jpg|600px|center]] | [[File:mixly-ctrl-sword.jpg|600px|center]] | ||
Line 58: | Line 58: | ||
'''ColorLED prepare, wait for the touch sensor to be pressed.''' | '''ColorLED prepare, wait for the touch sensor to be pressed.''' | ||
[[File:mixly-ctrl-sword-code.jpg|600px|center]] | [[File:mixly-ctrl-sword-code.jpg|600px|center]] | ||
− | Use | + | Use "every time" to make the two LEDs light up gradually. |
<br> | <br> | ||
Define the variable i to the value of the red light of the color LED, and it increases from 0 to 255, by 1 each time; the red light values of LED 1, 2 vary with the change of i. | Define the variable i to the value of the red light of the color LED, and it increases from 0 to 255, by 1 each time; the red light values of LED 1, 2 vary with the change of i. |
Latest revision as of 06:21, 9 October 2016
ContentsOutlineLet's make a force sword, which will light up gradually when we hold the hilt.
Module BillModule
Other Equipment
Module SetupSetup
ProgrammingRequired Program Blocks
Programming ThoughtColorLED prepare, wait for the touch sensor to be pressed, and make the "every time" program block light up gradually. Start To ProgramColorLED prepare, wait for the touch sensor to be pressed. Use "every time" to make the two LEDs light up gradually.
Test the result
Technical Specification
Related CasesFAQ |