tasmocompiler icon indicating copy to clipboard operation
tasmocompiler copied to clipboard

Drivers not loading correctly with script

Open parsecdata opened this issue 2 years ago • 4 comments

I have been working for a couple of days to get the BME680 and APDS-9960 to work with no luck. When running though the tasmocompiler under option 3, I select nothing else other that what is default, in option 4 I am putting

#ifndef USE_APDS9960 #define USE_APDS9960 // Enable APDS9960 Proximity Sensor (+4k7 code) #endif

#ifndef USE_BME680 #define USE_BME680 // Enable support for BME680 sensor using Bosch BME680 library (+4k code) #endif

After uploading, the bme680 does not work at all. I also do not see any options to enable i2c, it is not detected at all. If I use the tasmota-sensors.bin file, the bme680 works out of the box. If i use tasmocompiler and select nothing and just use

#ifndef USE_APDS9960 #define USE_APDS9960 // Enable APDS9960 Proximity Sensor (+4k7 code) #endif

The apds works fine. I have also tried the above script with both sensors and also adding USE_I2C. Still no luck on reading the bme680 sensor. I have also tried not adding any script and selecting the boxes for all sensors in step 3, no luck. I worked with Vic from the Tasmota discord and he built a bin file for me that did not use tasmocompiler and both sensors work perfectly.

I am just curious if I am scripting wrong in step 4, or something is being missed in the tasmocompiler.

parsecdata avatar Apr 07 '22 16:04 parsecdata

Hi, APDS9960 is included in Temp/Hum/Pressure or Light sensors - have a look at the TasmoCompiler features description. When you select those features I2C is included by TasmoCompiler. To use BME680 you have to use "Custom Parameters" field, but you have to remember that I2C is not included by default by TasmoCompiler, so if there is no other selected features that includes I2C, you have to include it by "Custom Parameters" field (USE_I2C). You have to be also aware that to use BME680 you have to enable USE_BMP first: https://github.com/arendst/Tasmota/blob/a538f35df4781730ef8b5b89a2d95e0410ae46f8/tasmota/xsns_09_bmp.ino#L21 https://github.com/arendst/Tasmota/blob/a538f35df4781730ef8b5b89a2d95e0410ae46f8/I2CDEVICES.md

Try to compile with this setup: Enable Temp/Hum/Pressure sensors - it includes USE_I2C, USE_APDS9960 and USE_BMP then in "Custom Parameters" field put those lines:

#ifndef USE_BME680
  #define USE_BME680
#endif

benzino77 avatar Apr 08 '22 06:04 benzino77

Ok, I just tested with another apds-9960 sensor, unfortunately I dont have another bme and I already set the other up. Not putting anything in the custom param section and just selecting Light Sensors and Temp/Hum sensors (dont see anything for pressure sensors) and upload that bin, the sensor only comes up as a TSL2561

parsecdata avatar Apr 08 '22 19:04 parsecdata

APDS9960 is included in "Light Sensors". To use BME680 you have to additionally select "Temp/Hum/Pressure" and include "Custom parameters" entries.

benzino77 avatar Apr 09 '22 11:04 benzino77

... or select only "Temp/Hum/Pressure" (it includes both APDS and BMP) and include "Custom parameters" entries.

benzino77 avatar Apr 09 '22 11:04 benzino77

Closing this issue due to no activity.

benzino77 avatar Sep 08 '22 18:09 benzino77