I am newbie in this area and I am not sure do I have to send some data to sensor before acquisition or something? I was reading some similar topics like the one connected with HTS221 and haven't found such info. Temp_c=(short int)(((unsigned short int)Buffer<<8)+((unsigned short int)Buffer)) īut no matter what (changing sensor adress, heating up the sensor etc.) I am getting output equal to 8306 C - and I didn't move to the Sun, Example code was tested with the Sparkfun MPU9250 breakout board and Nucleo-F401RE. Up to 3 x I 2 C interfaces (SMBus/PMBus) Up to 3 USARTs (2 x 10.5 Mbit/s, 1 x 5. other I2C ports (software or hardware) aside from the primary one. Up to 78 fast I/Os up to 42 MHz All I/O ports are 5 V-tolerant Up to 12 communication interfaces. Ret = HAL_I2C_Mem_Read(&hi2c1, LPS25HB_ADDR, TEMP_OUT_L|0x80, 1, Buffer, 2, HAL_MAX_DELAY) Up to 81 I/O ports with interrupt capability. In this tutorial, we will use the STM32F410-Nucleo board, that has the I2C signals on the PB6 and PB8 pins: Connect both boards used for I2C to the USB and make sure the SCL/SDA signals and ground are connected: Now we will create a project for the I2C Slave board. Then I wanted to read data via I2c and convert raw data to Celsius: //Read 2 consecutive registers in autoincrement mode starting from LPS25_TEMP_OUT_L I am using STM32CUBE IDE and, I've been struggling with reading data from X-Nucleo-IKS01A1 board which contains for example LPS25HB temperature and pressure sensor.Īccording to datasheet I have defined addresses and registers: static const uint8_t LPS25HB_ADDR = 0xB9
0 Comments
Leave a Reply. |