Hello
I bought AHT20+BMP280 sensor module on I2C, connected to Wemos2mini, uploaded tasmot-sensors and BMP280 reads and AHT20 no longer, displays VEML6070.
I do I2CScan = {"I2CScan": "Device(s) found at 0x38 0x77"}.
Response correct.
I2CDriver = {"I2CDriver":"7,8,9,10,11,12,13,14,15,17,18,20,24,29,31,36,41,42,44,46,48,69,76"}.
I2CDriver12 0 = {"I2CDriver": "7,8,9,10,11,!12,13,14,15,17,18,20,24,29,31,36,41,42,44,46,48,69,76"}.
I VEML6070 disappeared and still no AHT20.
I make my own compilation
I still only BMP.
I unplug AHT+BMP module and plug separate BMP and AHT modules and everything works as it should.
Not discouraged I fire up the Arduino and upload the AHT demo compilation and BMP plugs in the AHT+BMP module
Result:
I search and search and I can't find a solution.
The module works but not under Tasmot.
I bought AHT20+BMP280 sensor module on I2C, connected to Wemos2mini, uploaded tasmot-sensors and BMP280 reads and AHT20 no longer, displays VEML6070.
I do I2CScan = {"I2CScan": "Device(s) found at 0x38 0x77"}.
Response correct.
I2CDriver = {"I2CDriver":"7,8,9,10,11,12,13,14,15,17,18,20,24,29,31,36,41,42,44,46,48,69,76"}.
I2CDriver12 0 = {"I2CDriver": "7,8,9,10,11,!12,13,14,15,17,18,20,24,29,31,36,41,42,44,46,48,69,76"}.
I VEML6070 disappeared and still no AHT20.
I make my own compilation
#ifdef USE_BMP
#undef USE_BMP
#endif
#define USE_BMP
#ifdef USE_AHT2x
#undef USE_AHT2x
#endif
#define USE_AHT2x
I still only BMP.
I unplug AHT+BMP module and plug separate BMP and AHT modules and everything works as it should.
Not discouraged I fire up the Arduino and upload the AHT demo compilation and BMP plugs in the AHT+BMP module
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_BMP280.h>
#include <AHT20.h>
AHT20 aht20;
Adafruit_BMP280 bmp; // I2C
void setup() {
Serial.begin(9600);
while ( !Serial ) delay(100); // wait for native usb
Serial.println(F("BMP280 test"));
unsigned status;
//status = bmp.begin(BMP280_ADDRESS_ALT, BMP280_CHIPID);
status = bmp.begin();
if (!status) {
Serial.println(F("Could not find a valid BMP280 sensor, check wiring or "
"try a different address!"));
Serial.print("SensorID was: 0x"); Serial.println(bmp.sensorID(),16);
Serial.print(" ID of 0xFF probably means a bad address, a BMP 180 or BMP 085\n");
Serial.print(" ID of 0x56-0x58 represents a BMP 280,\n");
Serial.print(" ID of 0x60 represents a BME 280.\n");
Serial.print(" ID of 0x61 represents a BME 680.\n");
while (1) delay(10);
}
/* Default settings from datasheet. */
bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, /* Operating Mode. */
Adafruit_BMP280::SAMPLING_X2, /* Temp. oversampling */
Adafruit_BMP280::SAMPLING_X16, /* Pressure oversampling */
Adafruit_BMP280::FILTER_X16, /* Filtering. */
Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */
Serial.println("Humidity AHT20 examples");
Wire.begin(); //Join I2C bus
//Check if the AHT20 will acknowledge
if (aht20.begin() == false)
{
Serial.println("AHT20 not detected. Please check wiring. Freezing.");
while (1);
}
Serial.println("AHT20 acknowledged.");
}
void loop() {
Serial.print(F("Temperature = "));
Serial.print(bmp.readTemperature());
Serial.println(" *C");
Serial.print(F("Pressure = "));
Serial.print(bmp.readPressure());
Serial.println(" Pa");
//Get the new temperature and humidity value
float temperature = aht20.getTemperature();
float humidity = aht20.getHumidity();
//Print the results
Serial.print("Temperature: ");
Serial.print(temperature, 2);
Serial.println(" C\t");
Serial.print("Humidity: ");
Serial.print(humidity, 2);
Serial.println("% RH");
Serial.println();
delay(2000);
}
Result:
Temperature = 27.20 *C
Pressure = 98470.20 Pa
Temperature: 26.80 C
Humidity: 51.00% RH
I search and search and I can't find a solution.
The module works but not under Tasmot.