Add support for AM2320 Temperature and Humidity Sensor by Lars Wessels (#12485)

This commit is contained in:
Theo Arends 2021-06-27 13:53:19 +02:00
parent cf7da3dab2
commit 464ab2cb6b
8 changed files with 31 additions and 24 deletions

View File

@ -157,6 +157,7 @@ m = minimal, l = lite, t = tasmota, k = knx, s = sensors, i = ir, d = display
| USE_EZORTD | - | - | - / - | - | - | - | - |
| USE_SEESAW_SOIL | - | - | - / - | - | - | - | - |
| USE_TOF10120 | - | - | - / - | - | - | - | - |
| USE_AM2320 | - | - | - / - | - | - | - | - |
| | | | | | | | |
| Feature or Sensor | m | l | t | k | s | i | d | Remarks
| USE_SPI | - | - | - / - | - | - | - | x |

View File

@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
## [9.5.0.1]
### Added
- Enable UFILESYS, GUI_TRASH_FILE and GUI_EDIT_FILE for any device compiled with more than 1M flash size
- Support for AM2320 Temperature and Humidity Sensor by Lars Wessels (#12485)
### Changed
- ESP32 core library from v1.0.6 to v1.0.7

View File

@ -93,3 +93,4 @@ Index | Define | Driver | Device | Address(es) | Description
57 | USE_TOF10120 | xsns_84 | TOF10120 | 0x52 | Time-of-flight (ToF) distance sensor
58 | USE_MPU_ACCEL | xsns_85 | MPU_ACCEL| 0x68 | MPU6886/MPU9250 6-axis MotionTracking sensor from M5Stack
59 | USE_BM8563 | xdrv_56 | BM8563 | 0x51 | BM8563 RTC from M5Stack
60 | USE_AM2320 | xsns_88 | AM2320 | 0x5C | Temperature and Humidity sensor

View File

@ -98,6 +98,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
## Changelog v9.5.0.1
### Added
- Enable UFILESYS, GUI_TRASH_FILE and GUI_EDIT_FILE for any device compiled with more than 1M flash size
- Support for AM2320 Temperature and Humidity Sensor by Lars Wessels [#12485](https://github.com/arendst/Tasmota/issues/12485)
### Changed
- ESP32 core library from v1.0.6 to v1.0.7

View File

@ -632,7 +632,7 @@
// #define USE_SEESAW_SOIL // [I2cDriver56] Enable Capacitice Soil Moisture & Temperature Sensor (I2C addresses 0x36 - 0x39) (+1k3 code)
// #define USE_MPU_ACCEL // [I2cDriver58] Enable MPU6886/MPU9250 - found in M5Stack - support both I2C buses on ESP32 (I2C address 0x68) (+2k code)
// #define USE_BM8563 // [I2cDriver59] Enable BM8563 RTC - found in M5Stack - support both I2C buses on ESP32 (I2C address 0x51) (+2.5k code)
// #define USE_AM2320 // [I2cDriver60] Enable AM2320 temperature and humidity Sensor (I2C address 0x5C)()
// #define USE_AM2320 // [I2cDriver60] Enable AM2320 temperature and humidity Sensor (I2C address 0x5C) (+1k code)
// #define USE_DISPLAY // Add I2C Display Support (+2k code)
#define USE_DISPLAY_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0
#define USE_DISPLAY_LCD // [DisplayModel 1] [I2cDriver3] Enable Lcd display (I2C addresses 0x27 and 0x3F) (+6k code)

View File

@ -725,7 +725,7 @@ void ResponseAppendFeatures(void)
static uint32_t feature8 = 0x00000000;
if (!feature8) { // Only fill this once
#if defined(USE_I2C) && defined(USE_MPU6886)
#if defined(USE_I2C) && defined(USE_MPU_ACCEL)
feature8 |= 0x00000001; // xsns_85_mpu6886.ino
#endif
#ifdef USE_TFMINIPLUS
@ -737,11 +737,15 @@ void ResponseAppendFeatures(void)
#ifdef USE_BERRY
feature8 |= 0x00000008; // xdrv_52_9_berry.ino
#endif
// feature8 |= 0x00000010;
#if defined(USE_I2C) && defined(USE_BM8563)
feature8 |= 0x00000010;
#endif
#if defined(USE_ENERGY_SENSOR) && defined(USE_ENERGY_DUMMY)
feature8 |= 0x00000020;
#endif
// feature8 |= 0x00000040;
#if defined(USE_I2C) && defined(USE_AM2320)
feature8 |= 0x00000040;
#endif
// feature8 |= 0x00000080;
// feature8 |= 0x00000100;

View File

@ -1,7 +1,7 @@
/*
xsns_88_am2320.ino - Tasmota driver for I2C AM2320 Temp/Hum Sensor
xsns_88_am2320.ino - I2C AM2320 Temp/Hum Sensor for Tasmota
Copyright (C) 2019 Lars Wessels
Copyright (C) 2021 Lars Wessels
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -19,7 +19,6 @@
#ifdef USE_I2C
#ifdef USE_AM2320
/*********************************************************************************************\
* AM2320 - Digital Temperature and Humidity Sensor
* https://akizukidenshi.com/download/ds/aosong/AM2320.pdf
@ -194,7 +193,7 @@ void Am2320Show(bool json)
* Interface
\*********************************************************************************************/
bool Xsns92(uint8_t function)
bool Xsns88(uint8_t function)
{
if (!I2cEnabled(XI2C_60)) { return false; }

View File

@ -252,8 +252,8 @@ a_features = [[
"USE_BS814A2","USE_SEESAW_SOIL","USE_WIEGAND","USE_NEOPOOL",
"USE_TOF10120","USE_SDM72","USE_DISPLAY_TM1637","USE_PROJECTOR_CTRL"
],[
"USE_MPU6886","USE_TFMINIPLUS","USE_CSE7761","USE_BERRY",
"USE_HALLEFFECT","USE_ENERGY_DUMMY","","",
"USE_MPU_ACCEL","USE_TFMINIPLUS","USE_CSE7761","USE_BERRY",
"USE_BM8563","USE_ENERGY_DUMMY","USE_AM2320","",
"","","","",
"","","","",
"","","","",
@ -287,7 +287,7 @@ else:
obj = json.load(fp)
def StartDecode():
print ("\n*** decode-status.py v20210406 by Theo Arends and Jacek Ziolkowski ***")
print ("\n*** decode-status.py v20210627 by Theo Arends and Jacek Ziolkowski ***")
# print("Decoding\n{}".format(obj))