Hello everyone!, i'm try to use the sensor MPL3115A2 for read the temperature in th FRDM KL25, but the troubles starts when i compilate each program just appear a 255. By analying the code i don't know if i'm doing something wrong or the wrongly initializing the sensor , the program that i'm using is the next one. If anyone could help me to find my mistake on the code, i'll thank him so much!
Hi Luis,
The first thing I would recommend to do is to read the WHO_AM_I register (0x0C) to be sure your I2C communication is running properly. If you are not able to read a correct value (0xC4) from this register, then please post here screenshots illustrating both I2C write and read transactions (as shown in my example code) as well as your complete schematic.
Best regards,
Tomas