Skip to content

Add configurable I2C address parameter - #5

Open
Mr-Jay-420 wants to merge 3 commits into
kimsniper:mainfrom
Mr-Jay-420:main
Open

Add configurable I2C address parameter#5
Mr-Jay-420 wants to merge 3 commits into
kimsniper:mainfrom
Mr-Jay-420:main

Conversation

@Mr-Jay-420

Copy link
Copy Markdown

This PR makes the I2C address configurable via ROS 2 launch arguments

Changes

  • Added i2c_address parameter (default: 0x68)
  • Updated launch file with corresponding launch arguments
  • Added missing <array> include to fix build error with GCC 13

Usage

# Default (address 0x68)
ros2 launch ros2_mpu6050 ros2_mpu6050.launch.py

# Custom address (0x69 when AD0 pin is high)
ros2 launch ros2_mpu6050 ros2_mpu6050.launch.py i2c_address:=105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant