Main Content

Radio Receive

Receive data from micro:bit devices via radio

  • Radio Receive block

Libraries:
Simulink Coder Support Package for BBC micro:bit/Radio

Description

The Radio Receive block receives data from other micro:bit devices through a wireless connection.

Limitations

  • You can use only one Radio Receive block in a model.

  • The block can accept a maximum of 254 bytes in one sample time.

Ports

Output

expand all

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.

The status port outputs one of these values:

  • 1—Data is received.

  • 0—No data is received.

  • –1—Data is corrupted during reception.

Parameters

expand all

The channel number at which you want to receive data.

Note

The transmitter and receiver must be set to the same channel number.

The type of data the block receives. The size of each element depends on its data type.

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:

Data typeRange
double

1–31

single

1–63

int8

1–254

uint8

1–254

int16

1–127

uint16

1–127

int32

1–63

uint32

1–63

boolean

1–254

When you set this parameter to -1, Simulink® determines the best sample time for the block based on the block context within the model.

Version History

Introduced in R2017b

See Also

External Websites