10 years, 6 months ago.

Problem with KL25Z

The compiler fails to read #include "MMA8451Q.h". Error displayed is

  1. include file "MMA8451Q/MMA8451Q.h" includes itself "#include "MMA8451Q.h""

please help.

point to the program, which one did you include?

posted by Martin Kojtal 17 Feb 2015
  1. include "mbed.h"
  2. include "MMA8451Q.h" -->this library creates the problem
  1. define MMA8451_I2C_ADDRESS (0x1d<<1)

int main(void) {

MMA8451Q acc(P_E25, P_E24, MMA8451_I2C_ADDRESS); PwmOut rled(LED_RED); PwmOut gled(LED_GREEN); PwmOut bled(LED_BLUE);

while (true) { rled = 1.0 - abs(acc.getAccX()); gled = 1.0 - abs(acc.getAccY()); bled = 1.0 - abs(acc.getAccZ()); wait(0.1); } }

posted by Ramprasad Ramakrishnan 17 Feb 2015
Be the first to answer this question.