How can I code in C/C++ using the micro:bit


I want to write some code in C/C++ using the micro:bit.

What editor do I use to learn C/C++?

Where is the C/C++ editor?

I get an error when I compile C/C++ code in mbed.


mbed, C, C++, online IDE, compiler error


You can use the mbed online IDE and compiler from here:


Follow through the microbit-hello-world example video first, to make sure that everything is set up and working.


If you have previously used the mbed online compiler for other platforms, you might have to make sure that you select the BBC micro:bit target for your microbit-hello-world project before it will compile. If the wrong platform is selected when you compile the code, you will get errors.

To change the platform configured for your project:

1. In the Program Workspace window, click on your microbit-hello-world project to highlight it



2. Over on the far right at the top of the mbed IDE window, click on the platform icon and choose BBC micro:bit from the list


3. Press the compile button, the code should then compile and download a .hex file just as explained in the mbed microbit video.


4. Drag the .hex file onto your MICROBIT drive, and it will flash the code to the device. When it has finished downloading, you should see the message “Hello World :)” scroll on the screen.

0 found this helpful
All for Joomla All for Webmasters