センサー
異なるセンサーに接続してデータを読み取ります。
関数
センサー オブジェクト
mpu9250 | Connect to MPU-9250 sensor on Arduino hardware I2C bus |
lsm9ds1 | Connect to LSM9DS1 sensor on Arduino hardware I2C bus |
mpu6050 | Connect to MPU-6050 sensor on Arduino hardware I2C bus |
lsm303c | Connect to LSM303C sensor Arduino hardware I2C bus (R2021a 以降) |
lsm6ds3 | Connect to LSM6DS3 sensor on Arduino hardware I2C bus (R2021a 以降) |
lsm6ds3h | Connect to LSM6DS3H sensor on Arduino hardware I2C bus (R2021a 以降) |
lsm6dsl | Connection to LSM6DSL sensor on Arduino hardware I2C bus (R2021a 以降) |
lsm6dsm | Connect to LSM6DSM sensor on Arduino hardware I2C bus (R2021a 以降) |
lsm6dso | Connect to LSM6DSO sensor on Arduino hardware I2C bus (R2021a 以降) |
lsm6dsr | Connect to LSM6DSR sensor on Arduino hardware I2C bus (R2021a 以降) |
hts221 | Connect to HTS221 sensor on Arduino hardware I2C bus (R2021a 以降) |
lps22hb | Connect to LPS22HB sensor on Arduino hardware I2C bus (R2021a 以降) |
adxl345 | Connect to ADXL345, ADXL343, ADXL344, or ADXL346 sensor on Arduino hardware I2C bus (R2022a 以降) |
icm20948 | Connect to ICM-20948 sensor on Arduino hardware I2C bus (R2022a 以降) |
bmp280 | Connect to BMP280 sensor on Arduino hardware I2C bus (R2022b 以降) |
lis3dh | Connect to LIS3DH sensor on Arduino hardware I2C bus (R2022b 以降) |
bmi160 | Connect to BMI160 sensor on Arduino hardware I2C bus (R2023a 以降) |
adis16505 | Connect to ADIS16505 sensor on Arduino hardware SPI bus (R2024a 以降) |
センサー関数
flush | Flush the host buffer |
info | Read information related to sensor |
read | Read real-time sensor data at a specified rate |
readAcceleration | Read one sample of acceleration from sensor |
readAngularVelocity | Read one sample of angular velocity from sensor |
readMagneticField | Read one sample of magnetic field from sensor |
readTemperature | Read one sample of temperature from sensor (R2021a 以降) |
readHumidity | Read one sample of relative humidity data from the sensor (R2021a 以降) |
readPressure | Read one sample of barometric air pressure data from the sensor (R2021a 以降) |
readVoltage | Read voltage from ADC pins on sensor (R2023a 以降) |
release | Release the sensor object |
stop | Stop data collection from sensor object |
bno055 | Connect to BNO055 sensor on Arduino hardware I2C bus |
flush | Flush the host buffer for BNO055 sensor |
info | Read output data rate and bandwidth setting of BNO055 sensor |
read | Read acceleration, angular velocity, magnetic field, time, and overrun data from BNO055 sensor |
readAcceleration | Read one sample of acceleration from BNO055 sensor |
readAngularVelocity | Read one sample of angular velocity from BNO055 sensor |
readCalibrationStatus | Read calibration status of BNO055 sensor |
readMagneticField | Read one sample of magnetic field strength from BNO055 sensor |
readOrientation | Read orientation data from BNO055 sensor |
release | Release the BNO055 object |
gpsdev | Connect to GPS receiver on Arduino hardware |
flush | Flush the host buffer |
info | Read Update Rate, GPS Lock information and number of satellites in View for the GPS receiver |
read | Read data from GPS |
release | Release the GPS object |
stop | Stop data collection from GPS module |
writeBytes | Write raw data to GPS module |
apds9960 | Connect to APDS9960 sensor on Arduino hardware using I2C bus (R2021b 以降) |
readColor | Reads clear light and RGB components through APDS9960 sensor (R2021b 以降) |
readGesture | Read gesture through APDS9960 sensor (R2021b 以降) |
readProximity | Read the proximity from APDS9960 sensor (R2021b 以降) |
ultrasonic | Connection to ultrasonic sensor on Arduino hardware |
readDistance | Distance to object in front of ultrasonic sensor |
readEchoTime | Read echo time of ultrasound waves |
トピック
- Read and Plot Real-Time Data from BNO055 Sensor in NDOF Mode
This example shows you how to read and plot calibrated data from a Bosch Sensortec BNO055 a 9-axis absolute orientation sensor in real time. To read the orientation values directly from the BNO055 sensor, configure the sensor in the NDOF operating mode.
- Calibrate BNO055 Sensors
Steps to calibrate the BNO055 sensors.
- Limitations
Limitations when using sensors and GPS receiver.
- Calculate Pitch and Roll on Arduino Using IMU Sensor (Simulink)
This example shows how to read the acceleration and angular velocity data from IMU sensor mounted on Arduino® hardware and calculate the pitch and roll angles.
- Measure LSM9DS1 Sensor Outputs Using Nano 33 BLE Sense
Read data from a LSM9DS1 sensor using Bluetooth®.
トラブルシューティング
Troubleshoot sensors.
注目の例
Estimating Orientation Using Inertial Sensor Fusion and MPU-9250
Get data from an InvenSense MPU-9250 IMU sensor, and to use the 6-axis and 9-axis fusion algorithms in the sensor data to compute orientation of the device.
Wireless Data Streaming Using BNO055 and Bluetooth and Estimating Orientation Using Sensor Fusion
Get data from a Bosch BNO055 IMU sensor through HC-05 Bluetooth® module and to use the 9-axis AHRS fusion algorithm on the sensor data to compute orientation of the device. The example creates a figure which gets updated as you move the device.
Plot Position Using GPS Connected to Arduino Hardware
Get the geographic location using the GPS module connected on Arduino hardware and plot the location in a map.
IoT-Based Automatic Cooling Fan Control Using ThingSpeak and Arduino Hardware
Create a ThingSpeak™ channel and use the MATLAB® functions to collect the temperature data from a BMP280 sensor connected to your Arduino® board, and then use MATLAB Analysis in ThingSpeak to trigger the automatic control of a CPU cooling fan kept in the room and then monitor the usage of the fan by calculating the runtime. This example also shows you how to set up an email alert if the fan turns on, by using MATLAB functions in ThingSpeak.
IoT-Based Temperature Monitoring Using ThingSpeak and Arduino Hardware
Create a ThingSpeak™ channel and use MATLAB® functions to collect the temperature data from a BMP280 sensor connected to your Arduino® board, and then use MATLAB Analysis in ThingSpeak to analyze the maximum and minimum temperature. This example also shows you how to set up an email alert if the room temperature exceeds a threshold value, by using MATLAB functions in ThingSpeak.
Classify and Count Fruits Using Arduino Nano 33 BLE Sense, ThingSpeak, and Machine Learning
Collect RGB values of three types of fruits using the APDS9960 sensor embedded in an Arduino® Nano 33 BLE board and use the MATLAB® 分類学習器 (Statistics and Machine Learning Toolbox) app to train a machine learning model with the RGB values to classify the fruits. This example also shows how to use the ThingSpeak™ platform for tracking the number of fruits in a box and setting up an email alert if the number of any one of the three types of fruits drops to zero.
Identify Shapes Using Machine Learning on Arduino Nano 33 BLE Sense Hardware
Use MATLAB® Support Package for Arduino® Hardware to identify shapes using a machine learning algorithm. This example uses the Arduino Nano 33 BLE Sense hardware board with an onboard lsm9ds1
.
Human Activity Recognition Using ESP32 Board and LSM9DS1 IMU Sensor
Classify and predict one of three different physical human activities: Sitting, Standing and Walking based on data acquired using an ESP32 board and an lsm9ds1
sensor. This example uses 分類学習器 (Statistics and Machine Learning Toolbox) app to train a machine learning model with the sensor data. To access all the files for this example, click Open Live Script and download the attached files.
Perform Predictive Maintenance on Rotating Device Using ESP32 Board, ThingSpeak, and Machine Learning
Predict and monitor the health of a rotating device using machine learning algorithm. You can use this example for predictive maintenance of any rotating device or piece of equipment so that you can fix them before they fail.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)