Co to jest?
Potrząśnij swoim micro:bitem, aby usłyszeć fajną melodię. Ten projekt jest idealny dla uczniów początkujących z micro:bitem, ponieważ używa tylko dwóch bloków.

Jak to działa
- Twój micro:bit zawiera akcelerometr, który wykrywa ruchy.
- Gdy akcelerometr wykryje potrzęsienie, program poleca micro:bitowi, by zagrał melodię.
- Dane wejściowe umożliwiają nam umieszczanie informacji wejściowych w komputerze lub urządzeniu. W tym projekcie dane wejściowe są potrząśnięciem.
- Dane wyjściowe są przetwarzonymi informacjami wysyłanymi z komputera. W tym projekcie wyjściem jest muzyka odtwarzana z głośnika micro:bita.
Czego potrzebujesz
- micro:bit
- Edytor MakeCode
- pakiet baterii
- opcjonalnie głośnik i krokodylki, jeśli używasz micro:bita V1
Zakoduj swój projekt
Here are the blocks you need to make the project - now put them together.
Instrukcje krok po kroku
- Open the project to find the blocks you need using the buttons above.
- Find and select the play melody block.
- Put the play melody block inside the on shake block.
- Download the program to your micro:bit, attach a battery pack, and try it out!
Stwórz własny
- Try different tunes... Open the melody editor within the play melody block. Select the Gallery tab and choose a different pre-written tune to play. Which is your favourite?
- Play the tune faster or slower... Adjust the bpm (beats per minute) option inside the play melody block to a smaller number to play the tune more slowly. Or add a higher number to make the tune play more quickly. You can choose numbers from 40 to 500, either by using the sliding scale or typing them in.
Przykład ukończonego projektu
Take a peek at some completed code.
Powiązane projekty
Ten projekt jest częścią zbioru projektów integracyjnych dla uczniów z dysfunkcją wzroku.
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.


