Receive data from micro:bit devices via radio
Simulink Coder Support Package for BBC micro:bit/Radio
The Radio Receive block receives data from other micro:bit devices through a wireless connection.
You can use only one Radio Receive block in a model.
The block can accept a maximum of 254 bytes in one sample time.
Data— Received data
At each sample time, the port outputs received data as an N-by-1 array of the type specified in the Data type parameter and size specified in the Data length (N) parameter.
Status— Status of received data
The status port outputs one of these values:
1—Data is received.
0—No data is received.
–1—Data is corrupted during
Channel number (1–100)— Channel selected to receive data
1(default) | any integer from 1 to 100, inclusive
The channel number at which you want to receive data.
The transmitter and receiver must be set to the same channel number.
Data type— Type of data to be received
The type of data the block receives. The size of each element depends on its data type.
Data length (N)— Number of data units to be received
The number of data units received at each sample time. The range of permitted units is dependent on the data type, as summarized in the table:
Sample time— Interval at which the block reads data
-1| any nonnegative value
When you set this parameter to
-1, Simulink® determines the best sample time for the block based on the
block context within the model.