As the title says... Chat on...

User avatar
By Thomas Jakober
#89987 Hi all
I tried to upgrade my working program for the new module bme280_math because of the deprecation message I got with the old module. However I don't understand the new mandatory 'registers' parameter of the setup method. What is expected there? I understand that this is to fill the registers of the BME280, but why I should want to prepare first byte by byte the registers? Is this not the task of this function?
- I tried to omit this parameter however it just reboots the ESP. :(
- I tried to supply an empty string. This works without error and returns two values, as mentioned in the docs. What means 'user data'? A copy of the supplied optional parameters?
The second value is an array of 3 empty elements. I use a BME280. In the docs is probably a typo wen it says the BMP280 returns 3 elements. But why are they empty?
Unfortunately there is no example in the docs which would help to clarify what is meant in the docs. The referred examples of the old module do not work.
Any help to understand how this is intended to work is mich appreciated.
User avatar
By Thomas Jakober
#90712 I found the solution :D . I read only the half of the deprecation message :evil: . It's thought to be used in conjunction with the lua module 'bme280.lua'. This one is more or less compatible with the old c module. Only the function calling needs to be modified. However it's nothing mentioned in the new c module bme280_math description that there is an additional lua module to work with. This would also be helpful for new users who are not aware of the deprecation message.

Hope this helps

Thomas