Sie verfolgen jetzt diese Einreichung
- Aktualisierungen können Sie in Ihrem Feed verfolgter Inhalte sehen.
- Je nach Ihren Kommunikationseinstellungen können Sie auch E-Mails erhalten.
Support for the latest DHT sensor: the DHT20
The DHT20 sensor is an I2C sensor and must be connected to the I2C port of the Arduino
1. First, define your Arduino in your workspace:
a = arduino('<your COM Port>','Nano3','Libraries',{'I2C'});
2. Then, tell MATLAB that there is a DHT20 sensor attached to it.
dht20obj = dht20(a);
3. Once you've created your sensor object, you can ask it to take temperature and humidity readings, or both:
myTemperature = readTemperature(dht20obj);
myHumidity = readHumidity(dht20obj);
myDHTSensorData = readRawSensorData(dht20obj);
% can also call it using . annotation:
dht20obj.readHumidity;
dht20obj.readTemperature;
dht20obj.readSensorData;
Zitieren als
Eric Prandovszky (2026). DHT20 Temperature and Humidity (https://de.mathworks.com/matlabcentral/fileexchange/121792-dht20-temperature-and-humidity), MATLAB Central File Exchange. Abgerufen .
Quellenangaben
Inspiriert von: MATLAB Support Package for Arduino Hardware
Allgemeine Informationen
- Version 0.7.1 (6,48 KB)
Kompatibilität der MATLAB-Version
- Kompatibel mit R2021a und späteren Versionen
Plattform-Kompatibilität
- Windows
- macOS
- Linux
| Version | Veröffentlicht | Versionshinweise | Action |
|---|---|---|---|
| 0.7.1 |
|
||
| 0.7 |
