BME688 ESP32 ESP8266 Rasberry PI AVR

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
BenR
Matrix Staff
Posts: 1726
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 438 times
Been thanked: 602 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by BenR »

Thanks for letting me know, hopefully fixed for you now.

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by stefan.erni »

Hi Ben

Yes it's compiling now. Thanks a lot.
but.....
Reading temp ist always 33.551110
Reading humidty ist always 177.384328

First I tried adress 0x77 and config the sensor to 0x77 it's reading 33.551110
then I config just the programm to 0x76 it's reading 0.00000
then I config the modul also to 0x76 it's reading again 33.551110

I tried 100kz and 400kz clock. Always the same.
Also the parallel mode is the same.
regards

Stefan

BenR
Matrix Staff
Posts: 1726
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 438 times
Been thanked: 602 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by BenR »

Thanks Stefan,

I'll have a play with the hardware, could be my interface board was adding delays that allowed it to work correctly.

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by stefan.erni »

Hi Ben


My test before was i2c in softwaremode.

I tried just now with the i2c hardware, but I get a error msg on the usb port instead of of the result

regards

Stefan

ESP32 i2c hardware
esp_i2c_2022-06-10_10-12-17.jpg
esp_i2c_2022-06-10_10-12-17.jpg (111.75 KiB) Viewed 2458 times

BenR
Matrix Staff
Posts: 1726
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 438 times
Been thanked: 602 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by BenR »

Hello Stefan,

Is it possible to see the beginning of the debug log.

The initialise function should call the I2C Master init but it has some error checks for problems that can occur which might mean the i2c driver is not being installed and hopefully will give a reason as to why. Might be worth trying different IO pins if possible?

Code: Select all

		if (ESP_OK == (MX_ESP_I2C_ERROR_X = i2c_param_config(...)))
		{
			if (ESP_OK == (MX_ESP_I2C_ERROR_X = i2c_driver_install(...)))
			{
				return 1;
			}
		}

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by stefan.erni »

Hi Ben

Yes, here is the error log.

I can try another pins but the pins I used are the "usual" Pins for the i2c.


regards


Stefan
Error (2).txt
(5.98 KiB) Downloaded 91 times

LeighM
Valued Contributor
Posts: 395
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 70 times
Been thanked: 210 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by LeighM »

"i2c: i2c_param_config(647): i2c clock choice is invalid, please check flag and frequency"

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by stefan.erni »

Hi Leigh

I tried all the speed, with and without stop delay, channel1 and channel2, but
no success.
What do you mean by flag? The return value from the Initialise of the component?

regards

Stefan

i2c properties:
i2c_2022-06-10_14-19-17.jpg
i2c_2022-06-10_14-19-17.jpg (55.08 KiB) Viewed 2438 times

LeighM
Valued Contributor
Posts: 395
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 70 times
Been thanked: 210 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by LeighM »

"i2c: i2c_param_config(647): i2c clock choice is invalid, please check flag and frequency"
is from your error log.

If your MPU6886 is on Channel 1, then the BME688 should be set to Channel 2
If you still get the same error in the log, then I would suggest trying a project that only has MPU6886 or BME688.
Also try without Bluetooth, to try and narrow down what is causing the issue.
(Maybe Bluetooth is re-configuring the clocks?)

LeighM
Valued Contributor
Posts: 395
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 70 times
Been thanked: 210 times

Re: BME688 ESP32 ESP8266 Rasberry PI AVR

Post by LeighM »

Try this ...

Edit line 360 of ESP_CAL_I2C.c (found in directory C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP)

From this ...

Code: Select all

i2c_config_t conf;
to this ...

Code: Select all

i2c_config_t conf = {0};

Post Reply