Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

モデル化

ハードウェア接続用のモデルの準備、およびハードウェア プロトコルをサポートするためのブロックの追加

Android® デバイス用のアプリの作成に使用できる一連の Simulink® ブロックとコア機能。

ブロック

すべて展開する

AccelerometerMeasure linear acceleration along X, Y, and Z axes in m/s2
Ambient Temperature SensorMeasure ambient temperature in degree Celsius
GyroscopeMeasure rotational speed around X, Y, and Z axes in rad/s
Humidity SensorMeasure relative air humidity as percentage
Light SensorMeasure ambient light level in lux (lx)
Location SensorMeasure global positioning system data
Pressure SensorMeasure ambient air pressure in hectopascals (hPa)
MagnetometerMeasure magnetic field along X, Y, and Z axes
OrientationMeasure device rotation along X, Y, and Z axes
BLE SendSend data using Bluetooth Low Energy (BLE) protocol
BLE ReceiveReceive data using Bluetooth Low Energy (BLE) protocol
UDP SendSend data over UDP network to remote host
UDP ReceiveReceive data over UDP network from remote host
ThingSpeak WritePublish data to Internet of Things using ThingSpeak
ThingSpeak ReadRead data stored in ThingSpeak channel
TCP/IP SendSend data over TCP/IP network to another remote host
TCP/IP ReceiveReceive data over TCP/IP network from remote host
Serial TransmitSend buffered data to the serial port
Serial 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
TalkBack ReadRead command(s) from TalkBack ID on ThingSpeak TalkBack server (R2021b 以降)
TalkBack WriteWrite command(s) to TalkBack ID on ThingSpeak TalkBack server (R2021b 以降)
MQTT SubscribeSubscribe to an MQTT topic and receive message from the broker (R2023a 以降)
MQTT PublishPublish message to an MQTT broker with the specified Topic (R2023a 以降)
HTTP ClientSend and receive data from HTTP server over URL connection (R2023a 以降)
Audio CaptureCapture audio stream from device microphone
Audio File ReadAdd audio file from computer into mobile application
Audio File WriteWrite audio frames to an audio file
Audio PlaybackPlay audio on the device speaker
Video DisplayDisplay video on device display
CameraCapture video using front or rear camera
SliderDisplay slider widget
Data DisplayDisplay numerical data on your app screen
ButtonDisplay button widget on device screen
Data InputGenerate data input field on device screen
FromAppReceive data from method of app
ToAppSend data to method of app

関数

androidlibOpen the Simulink Library Browser to blocks for Android Devices

トピック

チュートリアル

    入門

    • Getting Started with Android Devices
      This example shows you how to use Simulink® Support Package for Android® Devices to run a Simulink model on an Android device.
    • Working with Android Devices Block Library
      This example shows how to use blocks from the Simulink® Support Package for Android® Devices to create a Simulink model and run it on an Android device.
    • Scope Block with Android Devices
      This example shows how to plot real-time data on an Android® device by using the Simulink® Scope block with Simulink Support Package for Android Devices.
    • Plot Array on Android Device
      This example shows how to create an Android® app to plot vector or array data on an Android device using the Array Plot block of DSP System Toolbox™ through a Simulink® model. To implement this workflow, you must install the Simulink Support Package for Android Devices.
    • Work with BLE Blocks on Android
      This example shows how to configure your Android® device to send data over Bluetooth® Low Energy (BLE) protocol and receive data on another Android device using BLE blocks from Simulink® Support Package for Android Devices.
    • Accept Input from Android Keyboard
      This example shows how to accept input values from the Android® keyboard and convert them to a logical output using Simulink® Support Package for Android Devices.
    • Get Started with Deploying Customizable Dashboard Blocks on Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to create an interactive dashboard display using the Dashboard Circular Gauge and ノブ blocks from the Simulink Customizable Blocks library. The example also shows you how to deploy the interactive dashboard application on your Android device such as tablet or phone. You can obtain the what you see is what you get (WYSIWYG) visualization on the application deployed on your Android device and web browser.
    • Get Started with MQTT Protocol on Android Devices
      This example shows how to use the Simulink® Support Package for Android® Devices to subscribe and publish data to topics of ThingSpeak™ and Mosquitto™ brokers via MQTT protocol.

    適用

    • Sensor Application
      This example shows you how to use Simulink® Support Package for Android® Devices to design an algorithm and augment the same with a custom GUI.
    • Color Detection
      This example shows you how to develop a Simulink® model for an image processing application - color detection by using Simulink Support Package for Android® Devices.
    • Color Replacement
      This example shows you how to use sliders and buttons from Simulink® Support Package for Android® Devices to develop an interactive system for color replacement application.
    • Enhanced Color Replacement with Customized Code Using Android Devices
      This example shows how to use FromApp block from Simulink® Support Package for Android® Devices to receive data and add a touch interface in an Android application. This example demonstrates a workflow to customize the Simulink generated Android project using Android Studio.
    • Human Activity Recognition Simulink Model for Smartphone Deployment
      This example shows how to prepare a Simulink® model that classifies human activity based on smartphone sensor signals for code generation and smartphone deployment. The example provides a Simulink models that is ready for deployment to an Android® device. After you install the required support package, train the classification model and deploy the Simulink model to the device.
    • Plot Route and Speed on a Map Using MAT-File Logging on an Android Device
      This example shows you how to plot the route and speed of your journey on a web map using MAT-file logging on an Android® device. GPS coordinates are collected in MAT-files and used to plot the route and speed.
    • Set Position of Bebop Drone on Gazebo Simulator from Android Device Using ROS
      This example shows how to generate an Android® application to set the position of the Parrot® Bebop drone on the Gazebo simulator using Simulink® Support Package for Android Devices. In this example, your computer is configured as ROS master, and the Android device is configured as ROS client. The device connects to the computer through the Robot Operating System (ROS) interface. The data received from the device is displayed using the simulator running on the computer.
    • Visualize Sensor Data from Android Device in RViz
      This example shows how to generate an Android® application to visualize live sensor data from an Android device on the ROS visualization (RViz) tool using Simulink® Support Package for Android Devices. In this example, sensor data such as orientation, angular velocity, and acceleration of the device are visualized. Your computer is configured as ROS master, and the Android device is configured as ROS client. The device connects to the computer through the Robot Operating System (ROS) interface. The sensor data from the device is visualized using the RViz tool running on the computer.
    • Customize Dashboard Widgets of Android Application Performing Temperature Conversion
      This example shows how to customize the dashboard widgets of an Android® application that performs temperature conversion from degree Celsius to Fahrenheit. This Android application consists of Edit and Display dashboard blocks. You can enter the temperature in degree Celsius in the Edit block and the Display block displays the temperature in degree Fahrenheit. You can customize the widget size, color, its placement on the Simulink® panel, and many more features to suit your requirements and functional area. Once you have designed the dashboard panel on the Simulink model, you can deploy it on your Android device such as phone or tablet, and obtain the exact same representation of the panel on the graphical user interface (GUI) dashboard of the Android application.
    • Communicate Using ThingSpeak TalkBack on Android
      This example shows how to use the Simulink® Support Package for Android® Devices to perform these actions on ThingSpeak™ TalkBack queue commands: delete all commands, add a command, execute next commands, and display last executed command. You can view these actions, along with their statuses, on an application deployed on your Android device or on the ThingSpeak TalkBack channel.
    • Create Custom User Interface for Android Application
      This example shows how to use the Simulink® Support Package for Android® Devices to create and integrate a customized user interface (UI) for an Android application.
    • Estimate Blood Pressure Using Algorithm Export Workflow on Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to integrate an algorithm developed in Simulink into an existing Android application using Android Studio. This example shows how to create a library module for the Simulink model that estimates blood pressure and displays it on an Android application. You can use this workflow to integrate any algorithm with an existing Android application using Android Studio.
    • Read and Write to ThingSpeak Channel Using Android HTTP Client Block
      This example shows how to use the HTTP Client block from the Simulink® Support Package for Android® Devices to read and write data to a field in a ThingSpeak™ channel.
    • Detect People with Notification from IFTTT on Android Devices
      This example shows how to use the HTTP Client block from the Simulink® Support Package for Android® Devices to trigger an HTTP request to IFTTT for any person detected and send push notification to any smart phone with IFTTT application.

    オーディオ処理を使用した適用例

    コンピューター ビジョンを使用した適用例

    • Get Started with Computer Vision Applications Using Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to get started with computer vision applications on Android devices. The example also helps you get accustomed with the Android device driver blocks such as Camera and Video Display.
    • Implement Histogram Equalization and Median Filtering on Images Using Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to implement histogram equalization and median filtering on images using an Android device.
    • Detect and Match Local Features Between Image Frames Using Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to determine the geometric transformation between a pair of images. When one image frame is distorted relative to another by rotation or scale, you can find out the rotation angle and scale factor to recover the original image.
    • Detect Stop Signal Traffic Sign Using Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to detect a stop signal traffic sign using an Android device. The example uses a cascade object detector to detect a stop sign using the Viola-Jones algorithm.
    • Stabilize Shaky Video Using Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to remove the effect of camera motion from a video stream. In the first video frame, the model defines the target to track. It also establishes dynamic search region, whose position is determined by the last known target location. The model only searches for the target within this search region, which reduces the number of computations required to find the target. In each subsequent video frame, the model determines how much the target has moved relative to the previous frame. It uses this information to remove unwanted translational camera movements and generate a stabilized video.
    • Detect and Display Live Barcode Using Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to detect and display live barcode data using an Android device. The example uses the Computer Vision Toolbox™ to create an image processing system which can recognize and interpret a GTIN-13 and universal product code (UPC) barcode. The GTIN-13 barcode, formally known as EAN-13, is an international barcode standard. It is a superset of the widely used universal product code UPC standard.
    • Detect and Track Objects Using Deep Learning on Android Device
      This example shows how to use the Simulink® Support Package for Android® Devices to deploy a deep learning algorithm that detects and tracks an object on your Android device such as a phone or tablet. This algorithm uses the ResNet-18-based YOLOv2 neural network to identify the object captured by the camera. You can experiment with different objects around you to see how accurately the network detects images on your Android device.
    • Digit Classification Using HOG Features on MNIST Database
      This example shows how to classify digits using HOG features and a multiclass SVM classifier.
    • Detect and Track Face on Android Device
      This example shows how to detect faces captured by an Android® camera using Simulink® Support Package for Android Devices. The model in this example tracks the face even when the person tilts the head, or moves toward or away from the camera.
    • Recognize Handwritten Digits Using MNIST Data Set on Android Device
      This example shows you how to recognize images of handwritten digits captured on your Android® device using Simulink® Support Package for Android Devices. On deployment, the Simulink model in this example builds an Android application on the device. Using the camera of the device to capture an image of any digit from 0 to 9, the application recognizes the digit and then outputs a label for the digit along with the prediction probability. This example uses the pretrained network, originalMNIST.mat, for prediction. The network has been trained using the Modified National Institute of Standards and Technology database (MNIST) data set.

    Raspberry Pi ハードウェアとの通信

    LEGO MINDSTORMS EV3 との通信

    Arduino ハードウェアとの通信

    MATLAB Function ブロックの使用