Piano for micro:bit User Manual Piano for Micro:bit User Manual INTRODUCTION Micro: bit is an ARM-based embedded system designed by the BBC of England, which is equipped with Bluetooth, accelerometer, electronic compass, three buttons, and a display consisting of 5x5 LED lattice. It is mainly used for computer education addressed to teenagers. You can use the BBC micro: bit to build any cool gadgets, whether it's a robot or a musical instrument, you can make anything you can imagine.
Piano for micro:bit User Manual As for its use, micro:bit officially recommends two programming methods: http://microbit.org/code/ As you can see, the official recommendation is to use JavaScript and Python. In their website, there are examples of these two programming languages. Click on “Let’s Code” to open the corresponding official website. JAVASCRIPT Use any browser to open Micro:bit's website as shown below. https://makecode.microbit.
Piano for micro:bit User Manual Click “Projects”, then “My stuff” and “New Project” to create a new project. Also, you can import previous projects, or refer to other people's projects and examples; On the left of micro:bit, there’s an analog display area. When the corresponding blocks are placed in the building blocks area, its dynamic effects will be displayed in response to them. In the middle of the selecting area there are some common building blocks packages.
Piano for micro:bit User Manual In the pop-up box, note that the url should be added with a space: https://github.com/waveshare/TouchPiano On the searching result, click “piano for micro:bit”. This way you’ll have added the blocks to control the piano module. Next, we will continue installing the “Neopixel” block package, which is the control module of the RGB lights. Similarly, click on “Advanced”->“Add Package”, then input in the popup window the following url: https://github.
Piano for micro:bit User Manual BASIC USE Clicking on “WSTouchPiano” you should see as below: The functions of each block are as follows: Hereby declare: the following are sample tutorials. 1. PLAYING PIANO Placement steps Go to “Basic”, and place “forever” slot into the blank space on the right. Place the “Play Piano” block of WSTouchPiano inside the “forever” slot. Click “Download” button on the bottom left to save the project, move the .
Piano for micro:bit User Manual Removing blocks and slots: Move back those blocks or slots that are not needed in the programming area to the block selection area on the left. Experiment phenomenon Touch the white piano keys from left to right, and in turn, DO, RE, MI, FA, SOL, LA, SI, DO. On each time you touch, the RBG LED lights up different colors.
Piano for micro:bit User Manual When touching the piano key C, micro:bit will display “C”, if you touch D, then micro:bit will also display D, if nothing is touched, it won’t displaying anything. 3 CONTROLLING RGB LED COLORS Placement steps Here we will omit some of the basics as they are mentioned above in this tutorial. Drag the “set LED_Color” 4-row block directly off the WSTouchPiano. Here the difference is at the back of each LED_Color.
Piano for micro:bit User Manual 4 CONTROLLING THE BUZZ ER Placement steps Drag off the “play tone” block from “Music” and click the first parameter. A piano keyboard will show up. Click the Middle C. The second parameter is used for tone length, which is the beat. Experiment phenomenon When the C key is pressed, the buzzer will ring one DO beat note.
Piano for micro:bit User Manual USING THE PYTHON Visit the official python programming website of micro:bit: http://python.microbit.org/v/1 You can see the following interface.
Piano for micro:bit User Manual In turn, written above you can see the corresponding picture: Download: Download the program to micro:bit. Save: Save the python program to the computer. Load: upload the local python program to the editor. Snippets: These are the definitions and usages of common statements. Help: Ask for Help with a more detailed description of the editor's usage.