Hello everybody,
i succeeded to get the output from BME280 and MPU6060 sensors
I need to merge them together
Kindly, I need help to Setup prj.conf file
Thanks & Regards
You can put both the BME280 and the MPU6060 dts nodes inside the same I2C node instance. Check how it's done in the board thingy91_nrf9160: https://github.com/nrfconnect/sdk-nrf/blob/v1.7.0/boards/arm/thingy91_nrf9160/thingy91_nrf9160_common.dts#L107-L126
Best regards,
Simon
Like I explained in this answer https://devzone.nordicsemi.com/support-private/support/279408#permalink=709631
you can execute stuff indirectly from an interrupt handler (button_pressed() in your case) using k_sem_give()/k_sem_take or a work queue thread.
I was just explaining how to execute stuff using an interrupt handler, e.g. the button interrupt handler. Such that when you click the button, you get the sensor output.
I'm not sure what your final goal is, do you want to get the sensor output when the button is pressed, or do you want to get it every 1 second, like it's done in your sample right now, or do you want to use trigger mode, such that the measurements are displayed at the rate they are produced by the sensor (only the mpu6050 sample supports this).
Rihab said:how can i get to display the output of the 2 other sensors on the same output please ?
Right now you're only printing the data from the BME280, like done in the bme280 sample. If you want to get the data from the mpu6050 as well at 1 second interval, you have to call process_mpu6050().
Best regards,
Simon
My final goal is to get both sensors output when the button is pressed but for now i'm only getting the clock of the button every time it's clicked .Knowing that when the button is clicked the led1 should be disactivated.
but for now i'm only getting this
i don't get what need to be done in order to get the other 2 sensors output .
i did integrated their code in my main.c
but i believe that something need to be added or edited in order to get the output of the MPU6050 and the BME280.
Infact, i need to create a functional loop : the main idea is, when i click the button the information of the sensors need to be displayed .
click the button ->get the output that I posted in the photo below + the output of the MPU & BME + the Led which gets disactivated when the button is clicked
but for now I'm getting the button pressed output and the Led disactivated when it's pressed
so can you please help me get this displayed please
Because i tried Multiple changes but unfortunately i didn't succeed
i'm seeking help from u please
and i'm very thankful for all of our responses
Kindly,
Rihab