Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 7 months ago.
Is this code compatible with Nucleo-L053R8 board? and ms58xx series sensors?
Hi, This is gandhi. I'm doing an internship. Here Can i use this code to run ms58xx series sensors? and also to Nucleo-L053R8 board. I'm getting errors like this: Error: Constant "PB_7" is not a type name in "ms5611.cpp", Line: 29, Col: 16 Error: Constant "PB_6" is not a type name in "ms5611.cpp", Line: 29, Col: 26
Question relating to:
1 Answer
9 years, 7 months ago.
Where does PB_6 and PB_7 come from? I2C for the L053R8 board is PB_8 and PB_9.
Try using the code example in the ms5611.h file. The MS5805 has a fixed I2C address of 0xEC, which is the same as the MS5611 with the CS pin tied high. Use the init line below:
ms5611 ms(PB_9, PB_8, ms5611::CSBpin_1); // if the above line doesn't work, try the following line instead // ms5611 ms(D14, D15, ms5611::CSBpin_1);
...kevin
show your code how you define ms5611 object
posted by Martin Kojtal 27 May 2015