user50565: I have a CNC Shield on top of an Arduino Uno (GRBL pinout) that controls 2 stepper motors through a4988 drivers and it is working like a charm.
Now I want to add an accelerometer to it. From my humble research, the MPU-6050 seems a good pick. 
If I purchase stacking headers to lift the CNC shield, can I connect the accelerometer to the unused/reserved A4 and A5 from the Arduino, but power it using CNC's Ground and 5V pins? 
I'm open to other approaches if I'm not doing it the proper way.

user37622: MPU6050 can use only I2C. Those are pins A4 and A5 on an Uno. 5V and ground are 5v and ground, no matter from which pin

50565: <p>I have a <strong><a href="https://www.google.ca/search?biw=1920&amp;bih=943&amp;tbm=isch&amp;sa=1&amp;ei=n4TOW7eNONGa_Qavj4eQDg&amp;q=CNC%20shield%20pinout&amp;oq=CNC%20shield%20pinout&amp;gs_l=img.3...1027.1106.0.1207.2.2.0.0.0.0.107.107.0j1.1.0....0...1c.1.64.img..2.0.0....0.oRXgLHXaWjI#imgrc=TvbYa1eErVZtTM:" rel="nofollow noreferrer">CNC Shield</a></strong> on top of an <strong>Arduino Uno</strong> <a href="https://www.google.ca/search?q=grbl+pinout+arduino&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ved=0ahUKEwjQ383lvJveAhVGpFkKHeOmBAwQ_AUIDigB&amp;biw=1920&amp;bih=943#imgrc=vx7m9YRUDwnTtM:" rel="nofollow noreferrer">(GRBL pinout)</a> that controls 2 stepper motors through <a href="https://www.google.ca/search?q=a4988&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ved=0ahUKEwiSj_nLwpveAhWQq1kKHV3FDN0Q_AUIDigB&amp;biw=1920&amp;bih=943#imgrc=s-_Efs_BmWkgOM:" rel="nofollow noreferrer">a4988</a> drivers and it is working like a charm.</p>

<p>Now I want to add an accelerometer to it. From my humble research, the <strong><a href="https://www.google.ca/search?q=mpu6050%20pinout&amp;tbm=isch&amp;source=iu&amp;ictx=1&amp;fir=HoKY3HCvU5ukaM%253A%252CeeFmV1QetaP_CM%252C_&amp;usg=AI4_-kSbhYvAc7XSWNmnHOmVQhtYTwbMHw&amp;sa=X&amp;ved=2ahUKEwiP3LG3vJveAhUiwVkKHRyeAAkQ9QEwCXoECAYQFg#imgrc=GYJF8Nah-qpxeM:" rel="nofollow noreferrer">MPU-6050</a></strong> seems a good pick. </p>

<p>If I purchase <em>stacking headers</em> to lift the CNC shield, can I connect the accelerometer to the <em>unused/reserved</em> <strong>A4</strong> and <strong>A5</strong> from the Arduino, but power it using CNC's <strong>Ground</strong> and <strong>5V</strong> pins? </p>

<p>I'm open to other approaches if I'm not doing it the proper way.</p>
 37622: <p>MPU6050 can use only I2C. Those are pins A4 and A5 on an Uno. 5V and ground are 5v and ground, no matter from which pin</p>
