Code for my book "micro:bit for the Mad Scientist"
Some of the programs in this book get pretty long and complex, and typing them in is not something that the Mad Scientist in you is likely to be keen to do.
All the Block code is published on the makecode website and shared by a short URL that will open your own copy of the Block code project in your browser. Here are the short URLs for the book's projects and experiments. Just click on them to open the project. Once the project is open, you can click on Download to create the HEX file that then needs to be dragged onto your micro:bit. If you feel like editing the Block code to try your own ideas out, then click on the Edit button.
Experiment 1. Generating Sounds
There is no block code for Experiment 2
[Link for Google Sheet spreadsheet for Experiment 4)(https://docs.google.com/spreadsheets/d/1qSybk116Zv5qyFtHL0l5jVkicrFcodrefVTEGUbmIYk/edit?usp=sharing)
There is no block code for Experiments 6 and 7
There is no block code for experiments 7 to 12.
If you are an expert developer, used to using git, then you can clone the entire project into your computer. However, if you just want to get the Python code, you can download it as a ZIP file. To do this, click on the green Clone or download button and select Download ZIP.
Find the ZIP file (mbms-master.zip) in your downloads area and then extract all the files from it. This will create a directory called 'mbms-master'. Within this directory you will find another directory called 'python' and within this, you will find all of the MicroPython programs for the book as a separate file, each with the extension .py.
Unfortunately Mu is not associated with the file type of .py, so to make it super easy to find the programs for the book when using Mu, I suggest that you copy all the MicroPython programs from the download into the directory where Mu normally expects to find its programs. By default this is a directory called mu_code within your home directory.
You may also have noticed that there is a directory here called 'other downloads'. This directory contains other files for projects, such as drawing templates.