Code Monkey home page Code Monkey logo

icm-20948's People

Contributors

drcpattison avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

icm-20948's Issues

Sketch won't compile

HI, thanks for sharing.
I have those compilation issues, and was wondering if you can help. ThanksπŸ‘

ICM20948BasicAHRS_I2C:202:165: error: 'MahonyQuaternionUpdate' was not declared in this scope
MahonyQuaternionUpdate(myIMU.ax, myIMU.ay, myIMU.az, myIMU.gx * DEG_TO_RAD,myIMU.gy * DEG_TO_RAD, myIMU.gz * DEG_TO_RAD,myIMU.my, myIMU.mx, myIMU.mz, myIMU.deltat);
^
ICM20948BasicAHRS_I2C:272:52: error: 'getQ' was not declared in this scope
Serial.print("q0 = "); Serial.print(getQ());
^
ICM20948BasicAHRS_I2C:294:42: error: 'getQ' was not declared in this scope
myIMU.yaw = atan2(2.0f * (
(getQ()+1) * *(getQ()+2) + *getQ()

No serial print on Arduino Due

Connected dpeng icm20948 via SDA and SCL to similar ports on Due (20 and 21).

Sketch compiles and downloads OK but no print output (connected via due programming port).

Serial print of gyro data works using other sketches with exactly the same hardware.

Is there any obvious reasons why I'm not getting any data out?

ICM20948.ccp mod

I had problem compiling the above section for the nrf52DK , but manage to fix all the problems / warning πŸ‘

1: replace return NULL by return 0

uint8_t ICM20948::writeByteWire(uint8_t deviceAddress, uint8_t registerAddress,
uint8_t data)
{
Wire.beginTransmission(deviceAddress); // Initialize the Tx buffer
Wire.write(registerAddress); // Put slave register address in Tx buffer
Wire.write(data); // Put data in Tx buffer
Wire.endTransmission(); // Send the Tx buffer
// TODO: Fix this to return something meaningful
//return NULL;
return 0;
}

2: replace int16_t mag_max[3] ... by int32_t mag_max[3] (0x8000 don't like uint_16 but 0x7FFF is OK);

void ICM20948::magCalICM20948(float * bias_dest, float * scale_dest)
{
uint16_t ii = 0, sample_count = 0;
int32_t mag_bias[3] = {0, 0, 0},
mag_scale[3] = {0, 0, 0};
int32_t mag_max[3] = {0x8000, 0x8000, 0x8000}, mag_min[3] = {0x7FFF, 0x7FFF, 0x7FFF};
int16_t mag_temp[3] = {0, 0, 0};
//int16_t mag_max[3] = {0x7FFF, 0x7FFF, 0x7FFF}, mag_min[3] = {0x7FFF, 0x7FFF, 0x7FFF}, mag_temp[3] = {0, 0, 0};

I might have change something else, I dont remember. I got the first part of the program working, I will try to fix the other issue later.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.