2022-12-13 07:16 AM
Hi!
I'm new to embedded programming and I'm trying to write a minimal program using I2C to read data from a pressure sensor.
I'm using the STM32F429 board and the Sen-16476 Sparkfun pressure sensor.
I'm unsure about which pins I need to connect between the sensor and the board, and how I should read the data in my cpp program. I've tried all combinations of connections and read addresses and nothing seems to work.
I'd appreciate any help/code snippets to just get the basic reading of the sensor. Thank you!
2022-12-13 07:32 AM
What STM32F429 board? The DISCO?
Wire 3V3, GND, SCL, SDA
Find available I2C interface pins on the STM32, check the manual/schematic
Address in STM32 space likely (0x18 << 1)
2022-12-16 01:59 AM
Hello @PReba.1,
First of all you need to set the configuration of the I2C for the communication based on STM32CubeMX :
Then generate The code.
The I2C address of the sensor : 0x18
Supply voltage : 1.6V - 3V6
Connect the 3V3, GND, SCL, SDA.
Foued.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.