Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›ICM-20948 9-Axis IMU

Component guide · Advanced · 3 min read

ICM-20948 9-Axis IMU

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the ICM-20948 isICM-20948 pinoutWiring the ICM-20948Example codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

The ICM-20948 from TDK InvenSense is a low-power 9-axis IMU: accelerometer, gyroscope and an AK09916 magnetometer, plus a Digital Motion Processor (DMP) for on-chip fusion. It connects over I2C (0x69 or 0x68) or SPI and runs from 1.8 to 3.6 V. It is the current replacement for the MPU9250 in robots, drones and wearables.

Key specs at a glance

Sensors
3-axis accelerometer, 3-axis gyroscope, 3-axis AK09916 magnetometer
Ranges
Accel ±2 to ±16 g, gyro ±250 to ±2000 °/s, mag ±4900 µT
Interface
I2C up to 400 kHz (0x68 or 0x69), SPI up to 7 MHz
Supply
1.71 to 3.6 V (3.3 V logic)
Extras
DMP for on-chip fusion, 512-byte FIFO, wake-on-motion
WHO_AM_I
0xEA

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1SparkFun 9DoF IMU Breakout – ICM-20948 (Qwiic & GPIO)₹2,659
  • Option 2TDK InvenSense ICM-20948 Motion Tracking Sensor Module – 9-Axis IMU w/ DMP, I2C/SPI₹849
  • Option 3TDK InvenSense ICM-20948 Low Power 9-Axis MEMS Motion Tracking Device Sensor Module₹789
01

What the ICM-20948 is

The ICM-20948 packs the same kind of sensors as the MPU9250 in a smaller, lower-power chip that is still in production. Its registers are split into four banks, so it is easiest to use with a library.

The DMP can run sensor fusion on the chip and output quaternions, which saves work on small boards. The SparkFun library supports both raw data and the DMP.

02

ICM-20948 pinout

The pins on the ICM-20948 and what each one does.

PinFunction
3V3 / VINSupply (3.3 V; some breakouts include a regulator)
GNDGround
SDA / SCLI2C data and clock
AD0Address select: low 0x68, high 0x69 (SparkFun default 0x69)
INTInterrupt output
CSSPI chip select; high for I2C
FSYNCFrame sync input (optional)
PinFunction
3V3 / VIN
Supply (3.3 V; some breakouts include a regulator)
GND
Ground
SDA / SCL
I2C data and clock
AD0
Address select: low 0x68, high 0x69 (SparkFun default 0x69)
INT
Interrupt output
CS
SPI chip select; high for I2C
FSYNC
Frame sync input (optional)
03

Wiring the ICM-20948

The ICM-20948 is a 3.3 V device. Use a level shifter on SDA and SCL with a 5 V Arduino, or the Qwiic connector with a 3.3 V board.

ICM-20948 pinArduino UnoESP32
VIN / 3V33.3V3V3
GNDGNDGND
SDAA4 via level shifterGPIO 21
SCLA5 via level shifterGPIO 22
AD0Open (0x69 on SparkFun)Open (0x69 on SparkFun)
VIN / 3V3
Arduino Uno:
3.3V
ESP32:
3V3
GND
Arduino Uno:
GND
ESP32:
GND
SDA
Arduino Uno:
A4 via level shifter
ESP32:
GPIO 21
SCL
Arduino Uno:
A5 via level shifter
ESP32:
GPIO 22
AD0
Arduino Uno:
Open (0x69 on SparkFun)
ESP32:
Open (0x69 on SparkFun)
04

Example code

Install "SparkFun 9DoF IMU Breakout - ICM 20948" from the Library Manager. Use begin(Wire, 0) if your board's AD0 is low (address 0x68).

Read accelerometer, gyro and compass (SparkFun ICM-20948 library) · Arduino C++Verify & upload in Electrolark
#include "ICM_20948.h"

ICM_20948_I2C imu;

void setup() {
  Serial.begin(115200);
  Wire.begin();
  Wire.setClock(400000);
  while (imu.begin(Wire, 1) != ICM_20948_Stat_Ok) {   // 1 = AD0 high (0x69)
    Serial.println("ICM-20948 not found, retrying");
    delay(500);
  }
}

void loop() {
  if (imu.dataReady()) {
    imu.getAGMT();
    Serial.print("acc mg "); Serial.print(imu.accX()); Serial.print(" "); Serial.print(imu.accY()); Serial.print(" "); Serial.print(imu.accZ());
    Serial.print("  gyro dps "); Serial.print(imu.gyrX()); Serial.print(" "); Serial.print(imu.gyrY()); Serial.print(" "); Serial.print(imu.gyrZ());
    Serial.print("  mag uT "); Serial.print(imu.magX()); Serial.print(" "); Serial.print(imu.magY()); Serial.print(" "); Serial.println(imu.magZ());
  }
  delay(50);
}
05

Setup and tuning

Address

SparkFun boards default to 0x69; other modules are often 0x68. Run an I2C scanner.

DMP

enable ICM_20948_USE_DMP in the library's config file to get quaternions from the chip.

Calibration

remove gyro offset at rest and calibrate the magnetometer with a figure-of-eight motion.

Noise

set the low-pass filters to suit vibration on your robot or drone.

06

What you need

Shop this list7 of 7 found in our store · ₹4,823

  • SparkFun 9DoF IMU breakout ICM-20948 (Qwiic): the sensor this guide coversSparkFun 9DoF IMU Breakout – ICM-20948 (Qwiic & GPIO)₹2,659Closest match, check the specs
  • TDK InvenSense ICM-20948 Motion Tracking Sensor Module – 9-Axis IMU w/ DMP, I2C/SPI: another version this guide coversTDK InvenSense ICM-20948 Motion Tracking Sensor Module – 9-Axis IMU w/ DMP, I2C/SPI₹849
  • TDK InvenSense ICM-20948 Low Power 9-Axis MEMS Motion Tracking Device Sensor Module: another version this guide coversTDK InvenSense ICM-20948 Low Power 9-Axis MEMS Motion Tracking Device Sensor Module₹789
  • ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
  • 4-channel logic level converter (BSS138): to connect 5 V and 3.3 V signals safely4-Channel Logic Level Converter (BSS138)₹20
  • Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
  • Solderless breadboard: to build without solderingSolderless Breadboard₹68
07

Alternatives and when to choose them

  • ✓MPU9250: the older part it replaces.
  • ✓BNO085: fusion done for you with higher accuracy.
  • ✓MPU6050: 6-axis for simple tilt and balance.
08

Try it: I2c pullup calculator

Change the values and the diagram and results update as you type.

09

Common mistakes to avoid

  • !Connecting it to 5 V logic without a level shifter.
  • !Using the wrong address flag (0 or 1) in begin() for the board's AD0 setting.
  • !Trying to read the magnetometer directly; it sits on the chip's internal auxiliary bus.
  • !Not calibrating the compass before using the heading.
10

Frequently asked questions

What is the ICM-20948's I2C address?

0x68 with AD0 low or 0x69 with AD0 high. SparkFun breakouts use 0x69.

Is it a replacement for the MPU9250?

Yes, it is TDK's current 9-axis part and is recommended for new designs.

Does it do sensor fusion?

Yes, its DMP can output quaternions; enable DMP support in the SparkFun library.

Can I use it with an Arduino Uno?

Yes with a level shifter, though a 3.3 V board is simpler.

What does WHO_AM_I return?

0xEA.

Parts for this guide

  • SparkFun 9DoF IMU Breakout – ICM-20948 (Qwiic & GPIO)
    ₹2,659View
  • TDK InvenSense ICM-20948 Motion Tracking Sensor Module – 9-Axis IMU w/ DMP, I2C/SPI
    ₹849View
  • TDK InvenSense ICM-20948 Low Power 9-Axis MEMS Motion Tracking Device Sensor Module
    ₹789View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • 4-Channel Logic Level Converter (BSS138)
    ₹20View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
  • Solderless Breadboard
    ₹68View
Shop Accelerometers, Gyroscopes & IMUs

Calculators

I2c pullup calculator

Terms in this guide

I2CInter-Integrated Circuit: a two-wire bus (SDA and SCL) that connects many devices by address.

Projects that use it

Put this into practice: 1 step-by-step build in our project library uses parts from this guide.

Intermediate · 3 hoursBike trip computer with GNSS speed and a crash alertView project
Browse all 1 project

Keep learning

Component guideIntermediateMagnetometers and 9-Axis IMUsA 9-axis IMU adds a magnetometer to a gyroscope and accelerometer so it can give a stable heading as well as roll and pitch.3 min read · SensorsComponent guideIntermediateMPU6050 Accelerometer and GyroscopeThe MPU6050 is a 6-axis motion sensor that combines a 3-axis accelerometer and a 3-axis gyroscope on one chip and talks over I2C at address 0x68.3 min read · SensorsHow-toIntermediate3.3 V vs 5 V LogicYou need level shifting when a 5 V device sends signals to a 3.3 V board such as an ESP32 or Raspberry Pi Pico, because 5 V on their pins can damage them.4 min read · Prototyping & WiringConcept explainerIntermediateI2C ExplainedI2C is a two-wire bus that lets one microcontroller talk to many sensors and displays using a data line (SDA) and a clock line (SCL).4 min read · Electronics Fundamentals

Sources

  • ICM-20948 datasheet (TDK InvenSense)
  • SparkFun ICM-20948 Arduino library

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the ICM-20948 isICM-20948 pinoutWiring the ICM-20948Example codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)4 items · ₹2,951

SparkFun 9DoF IMU Breakout – ICM-20948 (Qwiic & GPIO) · 4-Channel Logic Level Converter (BSS138) · Solderless Breadboard · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output
Serial monitor115200 baud
acc mg -2.54 -3.78 998.16  gyro dps -0.27 0.28 -0.23  mag uT 30.00 0.00 -38.40

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question