센서
여러 센서에 연결하여 데이터를 읽습니다.
함수
센서 객체
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.
- 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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 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)