BME680 reading values using c Code

I am trying to get my BME680 sensor working using c code, i just need a program to record the sensor values at intervals and save the data to a file, i have tested the sensor and it works correctly using Python, but i cannot get the c code examples to work or run. any help or example code that works would be greatly appreciated. for reference i am using the raspberry pi 4b

i cannot get the c code examples to work or run

Which C code examples? As far as I can see Pimoroni’s BME680 doesn’t come with any.

Also, when you say you can’t get them to run, what are you doing to try to run them, and what happens? It’s kind of impossible to help you without that information.

Apologies for being vague, bosch has some libraries linked here https://github.com/BoschSensortec/BME680_driver - i have downloaded them to pi… mid sentence i have realised that both bosch and pimoroni do a BME680 breakout sensor, i have the pimoroni one, is there not a way to use this sensor with c code

I did manage to get the sensor working with this c code https://github.com/twartzek/bme680-raspberry but again this is designed for the bosch sensor so im confused as to firstly how this worked and i would then assume it would be difficult to make my own program for the BME680 using c if there is no existing examples

bosch has some libraries linked here https://github.com/BoschSensortec/BME680_driver

OK, how did you try running them?

this is designed for the bosch sensor so im confused as to firstly how this worked

Bosh make the BME680 sensor, companies like Pimoroni then design it into their boards. The interfaces are standard, so theoretically anyone’s BME680 code should work with anyone’s BME680 breakout.

If you’re looking for examples to follow then use any BME680 library deisgned for the Pi which you can get to work. I will say though, Bosch sensors are good, but they are also more complex than most sensors: it isn’t just a case of reading the temperature from them. You have to read the raw value plus a bunch of calibration values, and then put them through an equation.

I downloaded them all put them in a file then went to the file on the terminal cd /home/pi/bme680 the compiled with gcc and tried to run the .c file and ah ok that would explain why it worked but the c code from bosch is very complex and difficult to understand especially compared to the python code. thank you for the help i will keep trying to get the bosch code to work and if i cant then python it is