Difference between revisions of "Constellation Projection Lamp"
(Created page with "{| style="width: 1000px;" |- | ==Outline== 600px|center Let’s make a constellation projection lamp whose color can be switched with two...") |
|||
Line 6: | Line 6: | ||
[[File:anywhere_constellation.jpg|600px|center]] | [[File:anywhere_constellation.jpg|600px|center]] | ||
− | + | Let's make a constellation projection lamp whose color can be switched with two touch buttons, and implement the effect of breathing lamp through keeping pressing the touch button all the time. | |
<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]] |
− | *[[ | + | *[["If-do" program block]] |
− | *[[ | + | *[["Delay" program block]] |
===Programming Thought=== | ===Programming Thought=== | ||
Line 58: | Line 58: | ||
'''ColorLED prepare, control the green breathing effect through touching the touch button 4.''' | '''ColorLED prepare, control the green breathing effect through touching the touch button 4.''' | ||
<br> | <br> | ||
− | If touch sensor 4 is pressed, | + | If touch sensor 4 is pressed, "every time" will be used to make the green LED change from weaker to the brightest gradually, implementing the effect of breathing lamp. If the touch sensor keeps being pressed down, the green light repeat breathing in cycle. |
[[File:mixly-ctrl-constellation-code.jpg|600px|center]] | [[File:mixly-ctrl-constellation-code.jpg|600px|center]] | ||
'''Effect of blue breathing lamp''' | '''Effect of blue breathing lamp''' | ||
<br> | <br> | ||
− | If touch button 2 is pressed, | + | If touch button 2 is pressed, "every time" will be used to make the blue LED change from the brightest to weaker, implementing the effect of breathing lamp. If the touch button keeps being pressed down, the blue light will repeat breathing in cycle. |
[[File:mixly-ctrl-constellation-code1.jpg|600px|center]] | [[File:mixly-ctrl-constellation-code1.jpg|600px|center]] | ||
<br> | <br> | ||
Line 86: | Line 86: | ||
==Q&A== | ==Q&A== | ||
*Q: Why does it breath in cycle only when the touch button keeps being pressed down? | *Q: Why does it breath in cycle only when the touch button keeps being pressed down? | ||
− | **A: Because after press, the state of release has only one, and the | + | **A: Because after press, the state of release has only one, and the "every time" will be executed once, if keep pressing, it can breath in cycle. |
|} | |} |
Latest revision as of 09:46, 9 October 2016
ContentsOutlineLet's make a constellation projection lamp whose color can be switched with two touch buttons, and implement the effect of breathing lamp through keeping pressing the touch button all the time.
Module BillModule
Other Equipment
Module SetupSetup
ProgrammingRequired Program Blocks
Programming ThoughtPress the touch button 2, and you will see the effect of green breathing lamp; press the touch sensor 2, and you will see the effect of blue breathing lamp. Start to ProgramColorLED prepare, control the green breathing effect through touching the touch button 4.
Effect of blue breathing lamp
Technical Specification
Related CasesQ&A
|