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. STM32Cube HAL and Nucleo-F401RE: debugging and unit testing. 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, MicroPython port to PolyMCU 2440 nrf52 ADC: minor fixes 2674 nrf52i2c: add support for. Nucleo F401RE System Clock could be driven by internal or external oscillator, as well as main PLL clock. Chris Stratton at 0:04 Add a comment 1 Answer Sorted by: 4 You should have searched the Reference Manua l of the controller. on Nucleo F401RE board USART TX RX pins are reserved for ST-Link serial connection therefore I have to assign another serial channel to connect the ESP8266 01 wifi module. Ret = HAL_I2C_Mem_Read(&hi2c1, LPS25HB_ADDR, TEMP_OUT_L|0x80, 1, Buffer, 2, HAL_MAX_DELAY) Look at your I2C setup code, it will be set somewhere there, likely loaded into a hardware register in the I2C peripheral or at least passed to an I2C setup function. 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. |