sparkfun / SparkFun_ICM-20948_ArduinoLibrary

Arduino support for ICM_20948 w/ portable C backbone
Other
160 stars 69 forks source link

How to change SPI speed of #87

Closed JacksonLtt closed 2 years ago

JacksonLtt commented 2 years ago

How could i change the speed of SPI? I want to increase speed of spi to 7 MHz. How could I achieve it?

PaulZC commented 2 years ago

I see you found the answer to this question:

https://github.com/JacksonLtt/sign_language/blob/7ebb86e165bc563886061e093ff36393b5663adf/Arduino/lib/SPI/six_imu_spi_dmp/six_imu_spi_dmp.ino#L88

Closing...

JacksonLtt commented 2 years ago

Hello Paul,

This is my code. I tried it but it didn’t work.

Best regards, Taiting

On Sat, Dec 18, 2021 at 04:17 Paul @.***> wrote:

Closed #87 https://github.com/sparkfun/SparkFun_ICM-20948_ArduinoLibrary/issues/87.

— Reply to this email directly, view it on GitHub https://github.com/sparkfun/SparkFun_ICM-20948_ArduinoLibrary/issues/87#event-5787832751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWQHVNMUHHJUUDX3O3YN2TURRGO5ANCNFSM5KJQ6GGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: <sparkfun/SparkFun_ICM-20948_ArduinoLibrary/issue/87/issue_event/5787832751 @github.com>

-- Major

PaulZC commented 2 years ago

Hello Taiting (@JacksonLtt ),

You can pass the SPI Speed as the third parameter when you call .begin :

myICM1.begin(CS_PIN_1, SPI_PORT, 7000000);

Best wishes, Paul

JacksonLtt commented 2 years ago

Hello Paul,

I tried this code. myICM1.begin(CS_PIN_1, SPI_PORT, 7000000); However, I got wrong feedback. Here is my output: image