Main Content

Modeling

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

The set of Simulink® blocks and core functionality available to create apps for your Android® devices.

Blocks

expand all

Accelerometer blockAccelerometerMeasure linear acceleration along X, Y, and Z axes in m/s2
Ambient Temperature Sensor blockAmbient Temperature SensorMeasure ambient temperature in degree Celsius
Gyroscope blockGyroscopeMeasure rotational speed around X, Y, and Z axes in rad/s
Humidity Sensor blockHumidity SensorMeasure relative air humidity as percentage
Light Sensor blockLight SensorMeasure ambient light level in lux (lx)
Location Sensor blockLocation SensorMeasure global positioning system data
Pressure Sensor blockPressure SensorMeasure ambient air pressure in hectopascals (hPa)
Magnetometer blockMagnetometerMeasure magnetic field along X, Y, and Z axes
Orientation blockOrientationMeasure device rotation along X, Y, and Z axes
BLE Send blockBLE SendSend data using Bluetooth Low Energy (BLE) protocol
BLE Receive blockBLE ReceiveReceive data using Bluetooth Low Energy (BLE) protocol
UDP Send blockUDP SendSend data over UDP network to remote host
UDP Receive blockUDP ReceiveReceive data over UDP network from remote host
ThingSpeak Write blockThingSpeak WritePublish data to Internet of Things using ThingSpeak
ThingSpeak Read blockThingSpeak ReadRead data stored in ThingSpeak channel
TCP/IP Send blockTCP/IP SendSend data over TCP/IP network to another remote host
TCP/IP Receive blockTCP/IP ReceiveReceive data over TCP/IP network from remote host
Serial Transmit blockSerial TransmitSend buffered data to the serial port
Serial Receive block iconSerial ReceiveReceive an [Nx1] array of data on the serial port and write it to the data block output. When data is not available, write 0 to the data block output
Android TalkBack Read block iconTalkBack ReadRead command(s) from TalkBack ID on ThingSpeak TalkBack server
Android TalkBack Write block iconTalkBack WriteWrite command(s) to TalkBack ID on ThingSpeak TalkBack server
Android MQTT Subscribe block iconMQTT SubscribeSubscribe to an MQTT topic and receive message from the broker (Since R2023a)
Android MQTT Publish block iconMQTT PublishPublish message to an MQTT broker with the specified Topic (Since R2023a)
Android MQTT Subscribe block iconHTTP ClientSend and receive data from HTTP server over URL connection (Since R2023a)
Audio Capture blockAudio CaptureCapture audio stream from device microphone
Audio File Read blockAudio File ReadAdd audio file from computer into mobile application
Audio File Write blockAudio File WriteWrite audio frames to an audio file
Audio Playback blockAudio PlaybackPlay audio on device speaker
Video Display blockVideo DisplayDisplay video on device screen
Camera blockCameraCapture video using front or rear camera
Slider blockSliderDisplay slider widget
Data Display blockData DisplayDisplay numerical data on device screen
Button blockButtonDisplay button widget on device screen
Data Input blockData InputGenerate data input field on device screen
FromApp blockFromAppReceive data from method of app
ToApp blockToAppSend data to method of app

Functions

androidlibOpen the Simulink Library Browser to blocks for Android Devices

Topics

Tutorials