Getting your code into your device is very easy with MakeCode. You do not need to install any software on your machine and the process takes two steps:
- Step 1: Connect your board via USB
- Step 2: Compile and Download the .uf2 file into your board drive
We are going to go through these two steps in detail.
Let's first verify that our code compiles properly in MakeCode.
MakeCode has a built-in simulator that re-loads and re-runs code when restarted. This is an easy way to both ensure that our code compiles and simulate it before moving it onto the board. The refresh button re-loads the simulator with your latest version of block code.
If your board is working in the simulator, it's time to download it to your actual board! Click the Download button. It will generate a .uf2 file and download it to your computer. UF2 is a file format designed by Microsoft to flash microcontrollers over USB.
General Steps to copy over your program (not specific to any Operating system)
* Ensure your board is connected via USB.
* Find the .uf2 file generated by MakeCode in your file explorer. Copy it to the MAKECODE or boardnameBOOT volume.
* The status LED on the board will blink while the file is transferring. Once it's done transferring your file, the board will automatically reset and start running your code (just like in the simulator!)