File Exchange

image thumbnail

Simulink Coder Support Package for BBC micro:bit Board

Tech Preview that generates and deploys code for BBC micro:bit

12 Downloads

Updated 21 Oct 2019

Simulink® Coder™ Support Package for BBC micro:bit enables you to design Simulink models and run them on the BBC micro:bit. The support package includes a library of Simulink blocks giving access to on-chip and on-board peripherals like accelerometer, magnetometer, 5x5 LED Matrix, IO pins etc. The model can be deployed to the hardware in one click including automatic flashing of the hardware. The support package also supports signal logging and parameter tuning while the code runs in real-time via External mode.
Note: This support package is a Technology Preview. Technology Previews provide advanced access to potential new product features. This gives you an opportunity to test out the functionality and provide feedback. As it is a Technology Preview, there may be functional limitations. Some features may change in future versions.

This support package is functional for releases from R2016b onwards.
Platforms support : Windows 64-bit and Mac

Check out the getting started video for the support package here:

Part1: https://www.youtube.com/watch?v=XURbzl7pIpI

This video shows you how to install the Simulink Coder™ Support Package for BBC micro:bit and how to update the firmware on the BBC micro:bit board to fully take advantage of all the capabilities of the support package

Part2: https://www.youtube.com/watch?v=rK32TXbdkKg

This video shows you how to create a Simulink® model to display a happy face on the 5x5 LED matrix present on the BBC micro:bit board. It also goes through the list of Simulink blocks allowing you to access peripherals on the board like ADC, PWM, Accelerometer, Magnetometer, GPIO, LED, I²C, SPI, Radio communications, etc

Part3: https://www.youtube.com/watch?v=g2tUzpII7ww

This video shows you how to create a Simulink® model that reacts on the accelerometer data to display different patterns on the 5x5 LED matrix present on the BBC micro:bit board. You will learn how to visualize signals and tune the parameters while the model is running in real-time on the hardware.

If you have download or installation issues, please contact Technical Support: www.mathworks.com/contact_ts

Comments and Ratings (12)

Hmmm and it works now... I dont know why... but it works :)
Martin

Antonin

Hi Martin,
Sorry, we are aware of this issue and we are trying to resolve it as fast as possible.
We should have it resolved by tomorrow.
I hope it helps,
Cheers,
Antonin.

Hi,
I have some issue (R2018b, macOS Mojave 10.14.1).

Details:
Download Error

Failed to download the third-party software:
Mbed Library

This is required by:
Simulink Coder Support Package for BBC microbit Board

Antonin

Hi Aswad,

Looks like there is an issue with the download of the Support Package. Could you please follow the steps to re-install the support package:
(If the Simulink Coder Support Package for BBC micro:bit Board is the only Support Package you have)
1) Uninstall the support package from Manage add-ons.
2) Go to the support package installation area are delete the remaining files and folders:
- In the MATLAB command window type: cd (matlabshared.supportpkg.getSupportPackageRoot)
- Delete the entire contents of the current MATLAB folder.
3) Go to downloads folder and delete the folder named MathWorks.
4) In the MATLAB command window type cd (tempdir) and hit enter. Delete the folders starting with 3p (ex: 3p.instrset_downloads4257019114058623838)
5) Re-install the Support Package from Add-ons.

In case you have more Support Packages installed, please share you email ID and I'll provide clear instructions to re-install the Support Package.

Aswad Akram

Hi Everyone,

Please help me as I am getting the following error while deploying to the Microbit:
-----------------------------------------------------------------------------
### Build procedure for model: 'untitled' aborted due to an error.
Error Report: Command "matlabshared.toolchain.gnu_gcc_arm.setup();" threw an error: The path 'C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\gnuarm-armcortex.instrset\bin' does not exist.
Caused by:
Validation error(s):
Command "matlabshared.toolchain.gnu_gcc_arm.setup();" threw an error: The path 'C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\gnuarm-armcortex.instrset\bin' does not exist.
-----------------------------------------------------------------------------

Thanks.

Hi Everyone,
The R2018a version of MATLAB is live now. We added two new Simulink Audio Blocks (Note Generator and Play Note) to the support package.
For more examples, please refer the following link:
https://www.mathworks.com/help/supportpkg/microbit/examples.html?s_cid=doc_ftr

You can also write MATLAB scripts to program your BBC Micro:bit board.
For more information, please refer the link :https://www.mathworks.com/help/supportpkg/microbit/working-with-matlab-functions-bbcmicrobit.html

Hi,
The Support package is now available with R2017a and You can now install on the R2017a. The 17a version comes up with fast external mode.

Hi, I seem to be unable to use this support package with R2017a! Is this not anymore compatible with the latest Matlab release or is there a further update to this package?
Thanks

MATLAB Release Compatibility
Created with R2016b
Compatible with R2016b to R2019b
Platform Compatibility
Windows macOS Linux
Communities