Modeling

Prepare model for hardware connection, add blocks to support hardware protocols

Blocks

expand all

Digital ReadRead logical state of digital input pin
Digital WriteSet logical state of digital output pin
Analog InputMeasure voltage of analog input pin
PWM OutputGenerate square wave on the specified output pin
I2C Master ReadRead data from I2C slave device or I2C slave device register
I2C Master WriteWrite data to I2C slave device or I2C slave device register
SPI Register ReadRead data from SPI slave device register
SPI Register WriteWrite data to registers of SPI slave device
SPI Master TransferWrite data to and read data from SPI slave device
SCI ReadRead N-by-1 array of data on UART
SCI WriteSend N-by-1 array of data to UART
MMA8652FC 3-Axis AccelerometerGet measurement of linear acceleration along the X, Y, and Z axes of the MMA8652FC 3-Axis chip
MAG3110 3-Axis MagnetometerGet measurement of magnetic field along the X, Y, and Z axes of the MAG3110 3-Axis chip
5x5 LED MatrixOutput 5x5 LED image on board
LED Text ScrollCreate scrolling text for BBC micro:bit
Radio ReceiveReceive data from micro:bit devices via radio
Radio TransmitTransmit data to micro:bit devices via radio
Note GeneratorGenerate frequency corresponding to a musical note
Play NotePlay musical note on specified pin on BBC micro:bit

Topics

Model Configuration Parameters for BBC micro:bit

Parameter and configuration options for creating and running applications on the target hardware.

Getting Started with Simulink Coder Support Package for BBC micro:bit

This example shows you how to use Simulink Coder Support Package for BBC micro:bit to run Simulink® model on a BBC micro:bit.

Dice Simulation on LED matrix

This example shows you how to develop a Simulink model to implement a Dice Simulation on BBC micro:bit board using the on board Accelerometer sensor and 5x5 LED Matrix.

Use Tilt Control on BBC micro:bit to Reach to a Target LED

This example shows you how to use a Simulink® model to build a simple game that uses tilt control on BBC micro:bit to reach to a target LED on the LED matrix, and see a happy face LED image upon success.

Wireless Control Between BBC mico:bit boards

This example shows you how to use Simulink® models for wireless communication and control between two BBC micro:bit boards.

Play Tunes and a Piano with a BBC micro:bit

This example shows you how to use Simulink® models to play musical tunes and a piano with BBC micro:bit.