Difference between revisions of "Little Song-Order Machine"
(Created page with "{| style="width: 1000px;" |- | ==Outline== 600px|center Make a little song-order machine, which will play different songs when different swi...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 22: | Line 22: | ||
|- | |- | ||
|[[mCookie-Battery|Battery box]]||1||Program download and power supply | |[[mCookie-Battery|Battery box]]||1||Program download and power supply | ||
+ | |- | ||
|[[mCookie-Hub|mCookie-Hub]]||1||Sensor adapter plate | |[[mCookie-Hub|mCookie-Hub]]||1||Sensor adapter plate | ||
|- | |- | ||
Line 48: | Line 49: | ||
==Programming== | ==Programming== | ||
===Required Program Blocks=== | ===Required Program Blocks=== | ||
− | *[[ | + | *[["Crash button" program block]] |
− | *[[ | + | *[["Buzzer on-song" program block]] |
− | *[[ | + | *[["If-do" program block]] |
===Programming Thought=== | ===Programming Thought=== | ||
− | Judge which crash is pressed with | + | Judge which crash is pressed with "if-do" condition statement, and play the corresponding song,and continue to judge after playing. |
[[File:mixly-ctrl-musicplay.jpg|600px|center]] | [[File:mixly-ctrl-musicplay.jpg|600px|center]] | ||
===Start Programming=== | ===Start Programming=== | ||
− | '''1. Press the crash of pin 4, an it will start to play the song | + | '''1. Press the crash of pin 4, an it will start to play the song "Doraemon".''' |
<br> | <br> | ||
− | With | + | With "if-do", "crash sensor", "buzzer on-song" program block, modify the pin number as the diagram shows, and choose song "Doraemon" or other songs. |
[[File:mixly-ctrl-musicplay-code1.jpg|600px|center]] | [[File:mixly-ctrl-musicplay-code1.jpg|600px|center]] | ||
− | '''2. Press the crash of pin 2, and it will start to play the song | + | '''2. Press the crash of pin 2, and it will start to play the song "Calabash Boys".''' |
<br> | <br> | ||
− | With | + | With "if-do", "crash button", "buzzer on-song" program block, modify the pin number as the diagram shows, and choose the song "Calabash Boys". |
[[File:mixly-ctrl-musicplay-code2.jpg|600px|center]] | [[File:mixly-ctrl-musicplay-code2.jpg|600px|center]] | ||
'''Test the result''' | '''Test the result''' | ||
<br> | <br> | ||
− | After upload the program, press the crash of pin 4, an it will start to play the song | + | After upload the program, press the crash of pin 4, an it will start to play the song "Doraemon"; press the crash of pin 2, and it will start to play the song "Calabash Boys". In this way, our little song-order machine is completed! Of course, you can also choose other songs to play. |
[[File:anywhere_musicplay.jpg|600px|center]] | [[File:anywhere_musicplay.jpg|600px|center]] | ||
==Technical Specification== | ==Technical Specification== | ||
Line 77: | Line 78: | ||
<br> | <br> | ||
==FAQ== | ==FAQ== | ||
− | * | + | *Q: Why does the buzzer not produce a sound when connect it directly to the power supply? |
− | ** | + | **A: Because the buzzer is one kind of passive buzzer, which can only ring with changed voltage signal. The active buzzer can ring after added with voltage. |
<br> | <br> | ||
− | * | + | *Q: Can the buzzer sing? |
− | ** | + | **A: It can produce do, re, mi, fa, sol, la, si tones of different frequencies, which can make up music. You can refer to [[Music Painting]]. If you want to play the music, an audio decoding chip and horn is essential. |
<br> | <br> | ||
− | * | + | *Q: Why can't we choose songs when it is playing the music? And we can only choose when it ends up playing. |
− | ** | + | **A: Because the "buzzer on-song" program block integrates the code, with internal procedures, it will only execute other control commands after executing the song. |
|} | |} |
Latest revision as of 10:30, 9 October 2016
ContentsOutlineMake a little song-order machine, which will play different songs when different switches are pressed.
Module BillModule
Other Equipment
Module Setup
ProgrammingRequired Program BlocksProgramming ThoughtJudge which crash is pressed with "if-do" condition statement, and play the corresponding song,and continue to judge after playing. Start Programming1. Press the crash of pin 4, an it will start to play the song "Doraemon".
2. Press the crash of pin 2, and it will start to play the song "Calabash Boys".
Test the result
Technical Specification
Related Cases
FAQ
|