Skip to content
This repository
Browse code

Update MPUTeapot.pde

Without that update, the packets were not aligned. I understand that '$' can be part of incoming packet but without this line, aligned was always 0.
commit f7fd92ea37ddb62204913a3cf9c58e799cc01c5f 1 parent e2fa9a6
pagalFromAgra pagalFromAgra authored
1  Arduino/MPU6050/Examples/MPU6050_DMP6/Processing/MPUTeapot.pde
@@ -146,6 +146,7 @@ void serialEvent(Serial port) {
146 146 while (port.available() > 0) {
147 147 int ch = port.read();
148 148 print((char)ch);
  149 + if (ch == '$') {serialCount = 0;} // this will help with alignment
149 150 if (aligned < 4) {
150 151 // make sure we are properly aligned on a 14-byte packet
151 152 if (serialCount == 0) {

6 comments on commit f7fd92e

albedo039

'hello...i add just this line , but my probleme is that the plane did not move.. and before it was the same...
i receive well the data from my arduino uno,it's look ok in serial windows but the plane don't want to move when i change my mpu6050 card from position..
i do the test under windows xp 32 bts and under linux ubuntu 13.10....i only add toxi lib in the library ...i've got no error message...i do not understand...

you could help ?
best...

Jeff Rowberg
Owner

Hi @albedo039,

Are you also changing the DMP6 example sketch to disable READABLE output and enable TEAPOT output? It will not work unless you do this also.

albedo039

oh yea !!.... i'm so confused !!...... now it's realy working good..

thank u very much..

ekstc

1) How does one download the library :/
2) I am having major difficulty in getting my MPU6050 to work with the Arduino DUE
PLEASE Help!?

Jeff Rowberg
Owner

@ekstc,

There are download, installation, and usage instructions on the main project website:

http://www.i2cdevlib.com/usage

Note that you need the download/copy/move only the contents of the main /Arduino subfolder into your /Arduino/libraries user lib folder, NOT the "MSP430" folder.

Jing Li

How to down load the teapot.pde

Please sign in to comment.
Something went wrong with that request. Please try again.