mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Update xsns_64_aht10.ino
Correct text
This commit is contained in:
parent
e2ede9ed55
commit
81b88a71a0
@ -73,7 +73,7 @@ bool AHT10Read(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
bool aht10init()
|
bool AHT10Init()
|
||||||
{
|
{
|
||||||
Wire.begin(AHT10_ADDR);
|
Wire.begin(AHT10_ADDR);
|
||||||
Wire.beginTransmission(AHT10_ADDR);
|
Wire.beginTransmission(AHT10_ADDR);
|
||||||
@ -81,13 +81,13 @@ bool aht10init()
|
|||||||
Wire.endTransmission();
|
Wire.endTransmission();
|
||||||
delay(500);
|
delay(500);
|
||||||
|
|
||||||
if((aht10ReadStatus() & 0x68) == 0x08) {
|
if((AHT10ReadStatus() & 0x68) == 0x08) {
|
||||||
return true;}
|
return true;}
|
||||||
else
|
else
|
||||||
{ return false; }
|
{ return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char aht10ReadStatus(void)
|
unsigned char AHT10ReadStatus(void)
|
||||||
{
|
{
|
||||||
unsigned char result = 0;
|
unsigned char result = 0;
|
||||||
Wire.requestFrom(AHT10_ADDR, 1);
|
Wire.requestFrom(AHT10_ADDR, 1);
|
||||||
@ -95,7 +95,7 @@ unsigned char aht10ReadStatus(void)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void aht10Reset(void)
|
void AHT10Reset(void)
|
||||||
{
|
{
|
||||||
Wire.beginTransmission(AHT10_ADDR);
|
Wire.beginTransmission(AHT10_ADDR);
|
||||||
Wire.write(eSensorResetCmd);
|
Wire.write(eSensorResetCmd);
|
||||||
@ -109,7 +109,7 @@ void AHT10Detect(void)
|
|||||||
if (I2cActive(AHT10_ADDR))
|
if (I2cActive(AHT10_ADDR))
|
||||||
{return;}
|
{return;}
|
||||||
|
|
||||||
if (aht10init())
|
if (AHT10Init())
|
||||||
{
|
{
|
||||||
I2cSetActiveFound(AHT10_ADDR, AHT10.name);
|
I2cSetActiveFound(AHT10_ADDR, AHT10.name);
|
||||||
AHT10.count = 1;
|
AHT10.count = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user