The Adafruit ICM20649 is a high-performance 6-axis motion tracking device that combines a 3-axis gyroscope and a 3-axis accelerometer. This integrated circuit module is designed for applications that require precise motion sensing and orientation tracking, such as drones, gaming devices, and wearable fitness trackers. Its small form factor and low power consumption make it ideal for portable electronics.
Pin Number | Name | Description |
---|---|---|
1 | VDD | Power supply voltage (1.71V to 3.6V) |
2 | GND | Ground connection |
3 | SCL/SPC | Serial Clock for I2C, Serial Port Clock for SPI |
4 | SDA/SDI | Serial Data for I2C, Serial Data Input for SPI |
5 | NCS | Chip Select for SPI (active low) |
6 | SDO/ADO | Serial Data Output for SPI, I2C Address selection |
7 | INT | Interrupt output (active high) |
8 | FSYNC | Frame synchronization (optional use) |
Q: Can the ICM20649 be used with an Arduino UNO? A: Yes, the ICM20649 can be connected to an Arduino UNO via I2C or SPI.
Q: What is the purpose of the FSYNC pin? A: The FSYNC pin is used for frame synchronization, which can be useful in applications requiring precise timing of data collection.
Q: How do I change the I2C address? A: The I2C address can be changed by connecting the SDO/ADO pin to either VDD or GND.
Below is an example of how to interface the Adafruit ICM20649 with an Arduino UNO using the I2C communication protocol. This code initializes the sensor and reads the accelerometer and gyroscope data.
#include <Wire.h>
// ICM20649 I2C address (depends on SDO/ADO connection)
const byte ICM20649_ADDRESS = 0x68; // Assuming SDO/ADO is connected to GND
// ICM20649 registers
const byte WHO_AM_I = 0x00;
const byte ACCEL_XOUT_H = 0x2D;
// ... (additional register definitions)
void setup() {
Wire.begin(); // Initialize I2C
Serial.begin(9600); // Start serial communication at 9600 baud
// Check if ICM20649 is connected
Wire.beginTransmission(ICM20649_ADDRESS);
Wire.write(WHO_AM_I);
Wire.endTransmission();
Wire.requestFrom(ICM20649_ADDRESS, 1);
if (Wire.read() == 0xEA) { // 0xEA is the expected WHO_AM_I value
Serial.println("ICM20649 is online.");
} else {
Serial.println("ICM20649 not found. Check connections.");
}
// Initialize ICM20649
// ... (configuration code)
}
void loop() {
// Read accelerometer and gyroscope data
// ... (data reading code)
// Print data to Serial
// ... (print statements)
delay(100); // Delay for readability
}
Note: This example code is for illustration purposes only and may require additional functions to configure the sensor and read data. Refer to the Adafruit ICM20649 datasheet and library documentation for complete implementation details.