There are lots of tools and programming languages available for the BBC micro:bit. That's one of the things that makes it so great. At Bitty Software we favour two them in particular though. MakeCode (previously known as PXT) is a web based tool from Microsoft and we think it's fantastic, especially if you're a beginner.
We also like coding using C/C++ with the mbed Yotta tools. Programming in C/C++ is unarguably a more advanced task than using the graphical approach of MakeCode but it's much more like how professional programmers do it and if it can be done at all, you can do it in C/C++ for sure.
So our advice is simple. If you're new to coding, start with MakeCode at https://makecode.microbit.org/ and when you feel you've mastered the key concepts, have a go at our C/C++ tutorials as well.
So what do you need to do to get started?
You don't need to do a single thing to get started with this awesome tool. All you need is a PC, tablet or phone which has a modern web browser on it. Go to https://makecode.microbit.org/ now and you'll see.
If you're an old hand working with C/C++ and complicated set up procedures, using Yotta will be a breeze. If you're not then getting started can be a challenge. It's worth the initial pain though so don't let anything get in your way!
You'll need a place for your project source code on your computer. Create a folder called something like "microbit", preferably right at the root of one of your drives, for example c:\microbit. You should download the microbit-samples code using 'git clone' into this folder and do all of your work in there. The next step takes about 'git' so read on.
git is a source code version control tool which is very commonly used these days. Yes, it has a peculiar name! If you don't know what's meant by a version control tool, it just means a tool that let's you keep track of the different versions of your code files as you change them. You can do things like revert to an older version if you make a mistake and you can share your code with other people easily too through publishing your code online in something called a git repository.
See github for more information about git and a place to create a repository if you decide to publish your code.
You need a 'git client' installed on your computer before you can complete the main Yotta setup steps below. There's lots of choice and there are both command line tools and tools with a Graphical User Interface (GUI) to choose from. We like command line tools for this kind of work best and recommend you give that a try. Download a git client for your machine and install it or install Cygwin and select its git client during the set up process.
The options we selected during the installation of a Git client for Windows are shown in our Git client setup page.
Yotta is a tool kit that lets you code using C/C++ using your desktop computer. There are a few things you need to do to get set up if you want to use Yotta.
You may find that you need to login with 'yt login' and if so, this means you need to create an account at the ARM mbed developer site. Note that you must be over 18 to open an account so if you're not, find a handy adult to help you with this step.
Lancaster University wrote the runtime software that micro:bit uses and they've documented the steps required to get set up for PC, Mac or Linux so follow their instructions for your type of desktop computer and you should be all set to go.
We also made a video showing the Yotta setup steps which you can watch on our Videos page.
Watch out! We got an error message setting up Yotta for Windows 10:
checking if libyaml is compilable "error: [Error 2] The system cannot find the file specified"
If this happens to you then try running the following command which solved our problem and then repeat the Yotta installation steps:
python -m pip install --upgrade wheel
Check your Yotta installation is OK by running the Run Yotta shortcut that was created for you and then executing "yt" in the resultant shell. You should see a result like this:
(workspace) D:\workspaces\microbit-samples>yt usage: yt [-h] [--version] [-v] [--plain] [--colourful] [--noninteractive] [-t TARGET] [--config path/to/config.json]
... yt: error: too few arguments
Make sure you install srecord from sourceforge: http://srecord.sourceforge.net/. After installing it, you need to ensure its executables are on your system path. An easy way to approach this is simply to copy the srecord .exe files into your yotta\gcc\bin folder.
Finally you need the source code for the micro:bit 'run-time' on your computer. You'll be modifying it to create your very own micro:bit code and building it into a hex file you can copy onto your micr:bit using the Yotta tools you just set up. This is described in the Lancaster University documentation.
Make sure you check your micro:bit Yotta environment is working by building the source code and copying the "Hello World" hex file onto your micro:bit. Assuming it works, you're all set for some Bitty Software tutorial fun!
micro:bit Blue is the Swiss Army knife of Bluetooth applications for micro:bit. It includes a collection of tools and demos which allow you to play with the various Bluetooth capabilities which your micro:bit has. It even includes a game controller app with which you could drive your Kitronik buggy!
If all you're looking for is a controller for your Kitronik buggy, however, we recommend keeping things simple and instead, using the bitty game controller application, which like micro:bit Blue, is free of charge.
Download and install micro:bit Blue direct from Google Play.
If you're using Yotta and C/C++ for coding then you'll need a text editor. A good text editor is a handy tool to have anyway. You can use any editor you like so if you already have a favourite, stick with it. If you don't or if you fancy a change then we recommend Microsoft's Visual Studio Code. It's available for Windows, Linux and Mac by the way.
nRF Connect is a great Bluetooth tool from Nordic Semiconductor, the company who make the Bluetooth chip for the BBC micro:bit. It's available for both Android and iOS from their respective application stores.