<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://bitwizard.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=MPU-6050_sensor_connected_to_Raspberry_Pi</id>
	<title>MPU-6050 sensor connected to Raspberry Pi - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://bitwizard.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=MPU-6050_sensor_connected_to_Raspberry_Pi"/>
	<link rel="alternate" type="text/html" href="https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;action=history"/>
	<updated>2026-04-05T18:23:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.6</generator>
	<entry>
		<id>https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;diff=1839&amp;oldid=prev</id>
		<title>Tom: /* Using the scripts */</title>
		<link rel="alternate" type="text/html" href="https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;diff=1839&amp;oldid=prev"/>
		<updated>2012-10-01T10:43:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Using the scripts&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:43, 1 October 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; watch -n 0.5 mpu-6050-gettemp&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; watch -n 0.5 mpu-6050-gettemp&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;If you grab hold of the sensor, you should see the reading go up.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;If you grab hold of the sensor, you should see the reading go up.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;Sample output for &quot;./mpu-6050-getall&quot;:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; Accelerometer:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; X: F0D4&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; Y: 3874&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; Z: E3A4&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; Gyroscope:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; X: FFF1&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; Y: FF03&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; Z: FFE2&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; Temperature:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; 25.791&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:wikidiff2:1.12:old-1838:rev-1839:1.13.0 --&gt;
&lt;/table&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;diff=1838&amp;oldid=prev</id>
		<title>Tom at 10:41, 1 October 2012</title>
		<link rel="alternate" type="text/html" href="https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;diff=1838&amp;oldid=prev"/>
		<updated>2012-10-01T10:41:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:41, 1 October 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;I was bored on a rainy sunday afternoon, so I connected an MPU-6050 6DOF (3 axis acceleromter, 3 axis gyroscope, thermometer) sensor to the I2C bus of my raspberry Pi. I also wrote some scripts to retrieve parse data. This is still a work in progress, but the basic features work.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;I was bored on a rainy sunday afternoon, so I connected an MPU-6050 6DOF (3 axis acceleromter, 3 axis gyroscope, thermometer) sensor to the I2C bus of my raspberry Pi. I also wrote some scripts to retrieve&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; and&lt;/ins&gt; parse&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; the&lt;/ins&gt; data. This is still a work in progress, but the basic features work.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;= The scripts =&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;= The scripts =&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:wikidiff2:1.12:old-1837:rev-1838:1.13.0 --&gt;
&lt;/table&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;diff=1837&amp;oldid=prev</id>
		<title>Tom: /* The scripts */</title>
		<link rel="alternate" type="text/html" href="https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;diff=1837&amp;oldid=prev"/>
		<updated>2012-10-01T10:39:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;The scripts&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:39, 1 October 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;= The scripts =&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;= The scripts =&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;Download link for all the scripts: http://www.bitwizard.nl/software/mpu-6050-tools.tar.gz&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Script to initialize the MPU-6050 (I named it mpu-6050-init):&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Script to initialize the MPU-6050 (I named it mpu-6050-init):&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; #! /bin/sh&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; #! /bin/sh&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:wikidiff2:1.12:old-1836:rev-1837:1.13.0 --&gt;
&lt;/table&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;diff=1836&amp;oldid=prev</id>
		<title>Tom: Created page with &quot;I was bored on a rainy sunday afternoon, so I connected an MPU-6050 6DOF (3 axis acceleromter, 3 axis gyroscope, thermometer) sensor to the I2C bus of my raspberry Pi. I also ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://bitwizard.nl/wiki/index.php?title=MPU-6050_sensor_connected_to_Raspberry_Pi&amp;diff=1836&amp;oldid=prev"/>
		<updated>2012-10-01T10:18:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;I was bored on a rainy sunday afternoon, so I connected an MPU-6050 6DOF (3 axis acceleromter, 3 axis gyroscope, thermometer) sensor to the I2C bus of my raspberry Pi. I also ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I was bored on a rainy sunday afternoon, so I connected an MPU-6050 6DOF (3 axis acceleromter, 3 axis gyroscope, thermometer) sensor to the I2C bus of my raspberry Pi. I also wrote some scripts to retrieve parse data. This is still a work in progress, but the basic features work.&lt;br /&gt;
&lt;br /&gt;
= The scripts =&lt;br /&gt;
Script to initialize the MPU-6050 (I named it mpu-6050-init):&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 &lt;br /&gt;
 i2cset -y 0 0x68 0x6b 0&lt;br /&gt;
&lt;br /&gt;
Script to read a byte (I named it mpu-6050-getbyte):&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 &lt;br /&gt;
 ADDR=$1&lt;br /&gt;
 i2cget -y 0 0x68 0x$ADDR | sed -e &amp;#039;s/^0x//g&amp;#039; | tr a-z A-Z&lt;br /&gt;
&lt;br /&gt;
Script to read a word (I named it mpu-6050-getword):&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 &lt;br /&gt;
 ADDR=`echo $1 | tr a-z A-Z`&lt;br /&gt;
 ADDR2=`echo &amp;quot;ibase=16; obase=10; $ADDR+1&amp;quot; | bc`&lt;br /&gt;
 VARmsb=`./mpu-6050-getbyte $ADDR;`&lt;br /&gt;
 VARlsb=`./mpu-6050-getbyte $ADDR2;`&lt;br /&gt;
 echo $VARmsb$VARlsb&lt;br /&gt;
&lt;br /&gt;
Script to read the temperatue (I named it mpu-6050-gettemp):&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 &lt;br /&gt;
 TEMP=`./mpu-6050-getword 41`&lt;br /&gt;
 echo &amp;quot;ibase=16; scale=3; ((-((FFFF-$TEMP)+1))/154)+24.87&amp;quot; | bc&lt;br /&gt;
&lt;br /&gt;
Script to read the accelerometers (I named it mpu-6050-getaccel):&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 &lt;br /&gt;
 echo X: `./mpu-6050-getword 3B`&lt;br /&gt;
 echo Y: `./mpu-6050-getword 3D`&lt;br /&gt;
 echo Z: `./mpu-6050-getword 3F`&lt;br /&gt;
&lt;br /&gt;
Script to read the gyroscopes (I named it mpu-6050-getgyro):&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 &lt;br /&gt;
 echo X: `./mpu-6050-getword 43`&lt;br /&gt;
 echo Y: `./mpu-6050-getword 45`&lt;br /&gt;
 echo Z: `./mpu-6050-getword 47`&lt;br /&gt;
&lt;br /&gt;
Script to read everything (I named it mpu-6050-getall):&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 &lt;br /&gt;
 echo Accelerometer:&lt;br /&gt;
 ./mpu-6050-getaccel&lt;br /&gt;
 echo&lt;br /&gt;
 echo Gyroscope:&lt;br /&gt;
 ./mpu-6050-getgyro&lt;br /&gt;
 echo&lt;br /&gt;
 echo Temperature:&lt;br /&gt;
 ./mpu-6050-gettemp&lt;br /&gt;
&lt;br /&gt;
PLEASE NOTE: These scripts are written on a version 1 board. To run them on a version 2, change the I2C bus from &amp;quot;0&amp;quot; to &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Using the scripts =&lt;br /&gt;
&lt;br /&gt;
To use these scripts, you need an I2C enabled Raspberry Pi. [[RPi_SPI_wheezy|This]] manual shosw you how to install the right modules.&lt;br /&gt;
You might need to enable the I2C modules, so, as root, do&lt;br /&gt;
 modprobe i2c-dev&lt;br /&gt;
&lt;br /&gt;
Now the root user can talk to the I2C bus. To enable an other user to talk to the I2C bus, without root privileges, run the following command as root:&lt;br /&gt;
 sudo usermod -a -G i2c &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scripts also use bc, a calculator program. Install this by running the following command as root:&lt;br /&gt;
 apt-get install bc&lt;br /&gt;
&lt;br /&gt;
The MPU-6050 boots up in a sleep mode, with all sensors disabled. To wake it up, run the mpu-6050-init script. Now you can start probing the MPU-6050. My first test was measuring the temperature, and see it change:&lt;br /&gt;
 watch -n 0.5 mpu-6050-gettemp&lt;br /&gt;
If you grab hold of the sensor, you should see the reading go up.&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
</feed>