Outcome:
Links:
Code editor https://makecode.microbit.org/
How to copy files to the micro:bithttps://makecode.microbit.org/device/usb
Step 1
The code
(as a general rule with the micro:bit, it is recommended to add a show icon to the start function, this will allow you to check if your code has successfully loaded to the micro:bit, and that it is running)
Create a new project. From the Music menu select Play tone , middle C.
Place the play tone code block into the forever function. You will notice when you do this the icon to the right will show a pair of cables coming off the board to a headphone socket and a tone will begin playing.
Now save the file. Select the text field next to the save button and type in buttonAB. This will be the file name for the project. Go ahead and click the save button to the right of this text field. This will download the code to you computer saving it as a .hex file. Copy this file to the micro:bit, as the data is transfered to the micro:bit a light will flash showing that a transfer is in progress. Visit https://makecode.microbit.org/device/usb for more information on uploading files to the micro bit.
Step 3
using the image as a guide connect two wires either to a headphone plug, OR the speaker supplied in your inventors kit. Feel free to ask your tutor for assistance



No comments:
Post a Comment