mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
prepare for merging
This commit is contained in:
parent
81b88a71a0
commit
7f72d266f8
@ -64,4 +64,4 @@ Index | Define | Driver | Device | Address(es) | Description
|
|||||||
41 | USE_DHT12 | xsns_58 | DHT12 | 0x5C | Temperature and humidity sensor
|
41 | USE_DHT12 | xsns_58 | DHT12 | 0x5C | Temperature and humidity sensor
|
||||||
42 | USE_DS1624 | xsns_59 | DS1621 | 0x48 - 0x4F | Temperature sensor
|
42 | USE_DS1624 | xsns_59 | DS1621 | 0x48 - 0x4F | Temperature sensor
|
||||||
42 | USE_DS1624 | xsns_59 | DS1624 | 0x48 - 0x4F | Temperature sensor
|
42 | USE_DS1624 | xsns_59 | DS1624 | 0x48 - 0x4F | Temperature sensor
|
||||||
43 | USE_AHT10 | xsns_64 | AHT10 | 0x38 | Temperature and humidity sensor
|
43 | USE_AHT1x | xsns_63 | AHT10/15 | 0x38 | Temperature and humidity sensor
|
||||||
|
@ -486,7 +486,7 @@
|
|||||||
// #define USE_HIH6 // [I2cDriver36] Enable Honeywell HIH Humidity and Temperature sensor (I2C address 0x27) (+0k6)
|
// #define USE_HIH6 // [I2cDriver36] Enable Honeywell HIH Humidity and Temperature sensor (I2C address 0x27) (+0k6)
|
||||||
// #define USE_DHT12 // [I2cDriver41] Enable DHT12 humidity and temperature sensor (I2C address 0x5C) (+0k7 code)
|
// #define USE_DHT12 // [I2cDriver41] Enable DHT12 humidity and temperature sensor (I2C address 0x5C) (+0k7 code)
|
||||||
// #define USE_DS1624 // [I2cDriver42] Enable DS1624, DS1621 temperature sensor (I2C addresses 0x48 - 0x4F) (+1k2 code)
|
// #define USE_DS1624 // [I2cDriver42] Enable DS1624, DS1621 temperature sensor (I2C addresses 0x48 - 0x4F) (+1k2 code)
|
||||||
#define USE_AHT10 // [I2cDriver43] Enable AHT10 humidity and temperature sensor (I2C address 0x38) (+0k8 code)
|
#define USE_AHT1x // [I2cDriver43] Enable AHT10/15 humidity and temperature sensor (I2C address 0x38) (+0k8 code)
|
||||||
|
|
||||||
// #define USE_DISPLAY // Add I2C Display Support (+2k 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_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0
|
||||||
|
@ -513,8 +513,8 @@ void GetFeatures(void)
|
|||||||
#ifdef USE_LE01MR
|
#ifdef USE_LE01MR
|
||||||
feature5 |= 0x08000000; // xnrg_13_fif_le01mr.ino
|
feature5 |= 0x08000000; // xnrg_13_fif_le01mr.ino
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_AHT10
|
#ifdef USE_AHT1x
|
||||||
feature5 |= 0x10000000; // xsns_64_aht10.ino
|
feature5 |= 0x10000000; // xsns_63_aht1x.ino
|
||||||
#endif
|
#endif
|
||||||
// feature5 |= 0x10000000;
|
// feature5 |= 0x10000000;
|
||||||
// feature5 |= 0x20000000;
|
// feature5 |= 0x20000000;
|
||||||
|
77284
tasmota/tasmota.ino.cpp
77284
tasmota/tasmota.ino.cpp
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
xsns_64_AHT10.ino - AHT10 I2C temperature and humidity sensor support for Tasmota
|
xsns_63_AHT1x.ino - AHT10 I2C temperature and humidity sensor support for Tasmota
|
||||||
|
|
||||||
Copyright (C) 2020 M. Wagner
|
Copyright (C) 2020 Martin Wagner
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -18,14 +18,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
#ifdef USE_AHT10
|
#ifdef USE_AHT1x
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
* AHT10 - Temperature and Humidity
|
* AHT10/15 - Temperature and Humidity
|
||||||
*
|
*
|
||||||
* I2C Address: 0x38
|
* I2C Address: 0x38
|
||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
#define XSNS_64 64
|
#define XSNS_63 63
|
||||||
#define XI2C_43 43 // See I2CDEVICES.md
|
#define XI2C_43 43 // See I2CDEVICES.md
|
||||||
|
|
||||||
#define AHT10_ADDR 0x38
|
#define AHT10_ADDR 0x38
|
||||||
@ -40,7 +40,7 @@ struct AHT10 {
|
|||||||
float temperature = NAN;
|
float temperature = NAN;
|
||||||
uint8_t valid = 0;
|
uint8_t valid = 0;
|
||||||
uint8_t count = 0;
|
uint8_t count = 0;
|
||||||
char name[6] = "AHT10";
|
char name[9] = "AHT10/15";
|
||||||
} AHT10;
|
} AHT10;
|
||||||
|
|
||||||
|
|
||||||
@ -60,6 +60,7 @@ bool AHT10Read(void)
|
|||||||
{
|
{
|
||||||
temp[i] = Wire.read();
|
temp[i] = Wire.read();
|
||||||
}
|
}
|
||||||
|
|
||||||
result_h = ((temp[1] << 16) | (temp[2] << 8) | temp[3]) >> 4;
|
result_h = ((temp[1] << 16) | (temp[2] << 8) | temp[3]) >> 4;
|
||||||
result_t = ((temp[3] & 0x0F) << 16) | (temp[4] << 8) | temp[5];
|
result_t = ((temp[3] & 0x0F) << 16) | (temp[4] << 8) | temp[5];
|
||||||
|
|
||||||
@ -160,7 +161,7 @@ void AHT10Show(bool json)
|
|||||||
* Interface
|
* Interface
|
||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
bool Xsns64(uint8_t function)
|
bool Xsns63(uint8_t function)
|
||||||
{
|
{
|
||||||
if (!I2cEnabled(XI2C_43)) { return false; }
|
if (!I2cEnabled(XI2C_43)) { return false; }
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user