This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

defining MPU in SES insted of Keil - Target options

Hello,

I have two quastions

(1)

     I am trying to run nrf5-mpu-simple written by , but there are just Keil's examples on Github and I am working in SES. There is written : Define your MPU in Keil's "Target Options -> C/C++". Use define "MPU9255", "MPU9150", or "MPU60x0". But how can I do the same thing in SES? I tried define it as is shown in attached printscreen, but it had error saying : "too many filenames given. Type cc1 --help for sage". So how can I do this right?

(2)

Also planning to migrate to SDK15.2 with these drivers, so the question is, what changes should I do? I read on infocenter that the drivers changed a bit, so I think it will be necesary to overwrite the nrf_mpu_twi driver where the old TWI API is used and also GPIO library for interrupts (not using yet, but planning). And what should be changed in config.h when migrating to SDK15.2?

using SDK 14.2, https://github.com/Martinsbl/nrf5-mpu-examples , nRF52832 with SES and MPU6050

thank you

Parents Reply
  • Thanks for answer. I tried it, but it was eventually better to use that library I attached in my first question. It is working but i do not understand this part of code in printing  function. What are these "/033[3;1H" ?

    err_code = app_mpu_read_gyro(&gyro_values);
                APP_ERROR_CHECK(err_code);
                int16_t sampleX = (gyro_values.x+700)*0.07;
                int32_t average = 0;
                average = calculate_ema(average,sampleX);
     
                NRF_LOG_INFO("\033[3;1HSample # %d\r\nX:", sampleX); 

    thanks

Children
Related