diff --git a/README.md b/README.md index 69b722798683336f08e5e6aa3c37b16d5e503b8d..6985c956ba232452acb5136b76c7ef1311a4c797 100755 --- a/README.md +++ b/README.md @@ -7,7 +7,38 @@ Shift and rotate the descending shapes to stack them up and try to line the bloc ## Build Instructions -... +_These instructions are intended for UNIX-like OSes, including GNU/Linux, macOS and friends. If you have access to a UNIX or POSIX environment on Windows such as MinGW or Cygwin, these instructions might also work there._ + +This project is written in C++ and uses the Device Abstraction Layer provided by Lancaster University. + +You will need **git** to download the project code and **yotta** to build it. + +Instructions for installing both of these and other prerequisites needed for building this project can be found [here](https://microbit-micropython.readthedocs.io/en/latest/devguide/installation.html#). + +Once the prerequisites have been installed, in the root directory of the repo, run the following: + +```sh +# set the compiler target architecture (only need to do once per shell session) +yt target bbc-microbit-classic-gcc +# this compiles the actual code +yt build +``` + +Be patient during compilation, if this is the first time you have cloned the source code, first-time compilation may take a while. + +When compilation has completed successfully, the executable file which is to be flashed onto the _micro:bit_ can be found at `build/bbc-microbit-classic-gcc/source/ufcfvk-15-2-internet-of-things-challenge-1-combined.hex` + +This needs to be flashed onto the _micro:bit_. This can be done by copying the executable file onto the removable drive that the _micro:bit_ exposes when connected by USB to a computer, for example: + +```sh +# NOTE: this assumes that your micro:bit is mounted at "/media/sf_MICROBIT/" +# it's probably actually located somewhere else on your machine +cp build/bbc-microbit-classic-gcc/source/ufcfvk-15-2-internet-of-things-challenge-1-combined.hex /media/sf_MICROBIT/ +``` + +The _micro:bit_ will flash its LED when it is being flashed. If successful, the LED should turn solid and the game should start running. + +**Blocks** very quickly draws three dots to the screen, then scrolls the text `BLOCKS!` on startup. The game then begins immediately. ## How to Play