Jump to content
I2Cdevlib Forums

MPU6050 connection failed


Recommended Posts

Hello there,
I will do.( http://www.instructables.com/id/Gyro-Stabilizer-W-Arduino-and-Servo/?ALLSTEPS )But I'll do it with an Arduino UNO. But I'm glad to help if I have some problems. Thank you for your attention.

Given the error:

 

 
 
 
 
 
 
 
 
 
 
sketch\I2Cdev.cpp:8:19: warning: character constant too long for its type [enabled by default]
 
     <meta charset='utf-8'>
 
                   ^
 
I2Cdev.cpp:26: error: stray '\302' in program
 
     <title>i2cdevlib/I2Cdev.cpp at master · jrowberg/i2cdevlib · GitHub</title>
 
     ^
 
I2Cdev.cpp:26: error: stray '\267' in program
 
I2Cdev.cpp:26: error: stray '\302' in program
 
I2Cdev.cpp:26: error: stray '\267' in program
 
sketch\I2Cdev.cpp:136:28: warning: missing terminating ' character [enabled by default]
 
   <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/jrowberg/i2cdevlib/search" class="js-site-search-form" data-scoped-search-url="/jrowberg/i2cdevlib/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
 
                            ^
 
I2Cdev.cpp:136: error: missing terminating ' character
 
   <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/jrowberg/i2cdevlib/search" class="js-site-search-form" data-scoped-search-url="/jrowberg/i2cdevlib/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
 
   ^
 
I2Cdev.cpp:632: error: stray '#' in program
 
         <td id="LC46" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">"</span>I2Cdev.h<span class="pl-pds">"</span></span></td>
 
                                                                      ^
 
I2Cdev.cpp:641: error: stray '#' in program
 
         <td id="LC48" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">if</span> I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE</td>
 
                                                                      ^
 
I2Cdev.cpp:650: error: stray '#' in program
 
         <td id="LC50" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_IMPLEMENTATION_WARNINGS</td>
 
                                                                          ^
 
I2Cdev.cpp:654: error: stray '#' in program
 
         <td id="LC51" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">if</span> ARDUINO < 100</td>
 
                                                                              ^
 
I2Cdev.cpp:658: error: stray '#' in program
 
         <td id="LC52" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> Using outdated Arduino IDE with Wire library is functionally limiting.</td>
 
                                                                                  ^
 
I2Cdev.cpp:662: error: stray '#' in program
 
         <td id="LC53" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> Arduino IDE v1.6.5+ with I2Cdev Fastwire implementation is recommended.</td>
 
                                                                                  ^
 
I2Cdev.cpp:662: error: too many decimal points in number
 
         <td id="LC53" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> Arduino IDE v1.6.5+ with I2Cdev Fastwire implementation is recommended.</td>
 
                                                                                                                                   ^
 
I2Cdev.cpp:666: error: stray '#' in program
 
         <td id="LC54" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> This I2Cdev implementation does not support:</td>
 
                                                                                  ^
 
I2Cdev.cpp:670: error: stray '#' in program
 
         <td id="LC55" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> - Repeated starts conditions</td>
 
                                                                                  ^
 
I2Cdev.cpp:674: error: stray '#' in program
 
         <td id="LC56" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> - Timeout detection (some Wire requests block forever)</td>
 
                                                                                  ^
 
I2Cdev.cpp:678: error: stray '#' in program
 
         <td id="LC57" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> ARDUINO == 100</td>
 
                                                                              ^
 
I2Cdev.cpp:682: error: stray '#' in program
 
         <td id="LC58" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> Using outdated Arduino IDE with Wire library is functionally limiting.</td>
 
                                                                                  ^
 
I2Cdev.cpp:686: error: stray '#' in program
 
         <td id="LC59" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> Arduino IDE v1.6.5+ with I2Cdev Fastwire implementation is recommended.</td>
 
                                                                                  ^
 
I2Cdev.cpp:686: error: too many decimal points in number
 
         <td id="LC59" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> Arduino IDE v1.6.5+ with I2Cdev Fastwire implementation is recommended.</td>
 
                                                                                                                                   ^
 
I2Cdev.cpp:690: error: stray '#' in program
 
         <td id="LC60" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> This I2Cdev implementation does not support:</td>
 
                                                                                  ^
 
I2Cdev.cpp:694: error: stray '#' in program
 
         <td id="LC61" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> - Repeated starts conditions</td>
 
                                                                                  ^
 
I2Cdev.cpp:698: error: stray '#' in program
 
         <td id="LC62" class="blob-code blob-code-inner js-file-line">            #<span class="pl-k">warning</span> - Timeout detection (some Wire requests block forever)</td>
 
                                                                                  ^
 
I2Cdev.cpp:702: error: stray '#' in program
 
         <td id="LC63" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> ARDUINO > 100</td>
 
                                                                              ^
 
I2Cdev.cpp:722: error: stray '#' in program
 
         <td id="LC68" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">endif</span></td>
 
                                                                              ^
 
I2Cdev.cpp:726: error: stray '#' in program
 
         <td id="LC69" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                          ^
 
I2Cdev.cpp:735: error: stray '#' in program
 
         <td id="LC71" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">elif</span> I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE</td>
 
                                                                      ^
 
I2Cdev.cpp:753: error: stray '#' in program
 
         <td id="LC75" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">elif</span> I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE</td>
 
                                                                      ^
 
I2Cdev.cpp:762: error: stray '#' in program
 
         <td id="LC77" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_IMPLEMENTATION_WARNINGS</td>
 
                                                                          ^
 
I2Cdev.cpp:766: error: stray '#' in program
 
         <td id="LC78" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">warning</span> Using I2CDEV_BUILTIN_NBWIRE implementation may adversely affect interrupt detection.</td>
 
                                                                              ^
 
I2Cdev.cpp:770: error: stray '#' in program
 
         <td id="LC79" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">warning</span> This I2Cdev implementation does not support:</td>
 
                                                                              ^
 
I2Cdev.cpp:774: error: stray '#' in program
 
         <td id="LC80" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">warning</span> - Repeated starts conditions</td>
 
                                                                              ^
 
I2Cdev.cpp:778: error: stray '#' in program
 
         <td id="LC81" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                          ^
 
I2Cdev.cpp:808: error: stray '#' in program
 
         <td id="LC88" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">endif</span></td>
 
                                                                      ^
 
I2Cdev.cpp:1292: error: stray '#' in program
 
         <td id="LC207" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                           ^
 
I2Cdev.cpp:1324: error: stray '#' in program
 
         <td id="LC215" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:1346: error: stray '#' in program
 
         <td id="LC220" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">if</span> (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:1355: error: stray '#' in program
 
         <td id="LC222" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">if</span> (ARDUINO < 100)</td>
 
                                                                               ^
 
I2Cdev.cpp:1417: error: stray '#' in program
 
         <td id="LC237" class="blob-code blob-code-inner js-file-line">                    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                                           ^
 
I2Cdev.cpp:1429: error: stray '#' in program
 
         <td id="LC240" class="blob-code blob-code-inner js-file-line">                    #<span class="pl-k">endif</span></td>
 
                                                                                           ^
 
I2Cdev.cpp:1450: error: stray '#' in program
 
         <td id="LC245" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> (ARDUINO == 100)</td>
 
                                                                               ^
 
I2Cdev.cpp:1515: error: stray '#' in program
 
         <td id="LC261" class="blob-code blob-code-inner js-file-line">                    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                                           ^
 
I2Cdev.cpp:1527: error: stray '#' in program
 
         <td id="LC264" class="blob-code blob-code-inner js-file-line">                    #<span class="pl-k">endif</span></td>
 
                                                                                           ^
 
I2Cdev.cpp:1547: error: stray '#' in program
 
         <td id="LC269" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> (ARDUINO > 100)</td>
 
                                                                               ^
 
I2Cdev.cpp:1612: error: stray '#' in program
 
         <td id="LC285" class="blob-code blob-code-inner js-file-line">                    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                                           ^
 
I2Cdev.cpp:1624: error: stray '#' in program
 
         <td id="LC288" class="blob-code blob-code-inner js-file-line">                    #<span class="pl-k">endif</span></td>
 
                                                                                           ^
 
I2Cdev.cpp:1636: error: stray '#' in program
 
         <td id="LC291" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">endif</span></td>
 
                                                                               ^
 
I2Cdev.cpp:1645: error: stray '#' in program
 
         <td id="LC293" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:1691: error: stray '#' in program
 
         <td id="LC304" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:1713: error: stray '#' in program
 
         <td id="LC309" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                           ^
 
I2Cdev.cpp:1729: error: stray '#' in program
 
         <td id="LC313" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:1787: error: stray '#' in program
 
         <td id="LC327" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                           ^
 
I2Cdev.cpp:1819: error: stray '#' in program
 
         <td id="LC335" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:1841: error: stray '#' in program
 
         <td id="LC340" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">if</span> (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:1850: error: stray '#' in program
 
         <td id="LC342" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">if</span> (ARDUINO < 100)</td>
 
                                                                               ^
 
I2Cdev.cpp:1935: error: stray '#' in program
 
         <td id="LC363" class="blob-code blob-code-inner js-file-line">                        #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                                               ^
 
I2Cdev.cpp:1947: error: stray '#' in program
 
         <td id="LC366" class="blob-code blob-code-inner js-file-line">                        #<span class="pl-k">endif</span></td>
 
                                                                                               ^
 
I2Cdev.cpp:1980: error: stray '#' in program
 
         <td id="LC374" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> (ARDUINO == 100)</td>
 
                                                                               ^
 
I2Cdev.cpp:2068: error: stray '#' in program
 
         <td id="LC396" class="blob-code blob-code-inner js-file-line">                        #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                                               ^
 
I2Cdev.cpp:2080: error: stray '#' in program
 
         <td id="LC399" class="blob-code blob-code-inner js-file-line">                        #<span class="pl-k">endif</span></td>
 
                                                                                               ^
 
I2Cdev.cpp:2112: error: stray '#' in program
 
         <td id="LC407" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> (ARDUINO > 100)</td>
 
                                                                               ^
 
I2Cdev.cpp:2201: error: stray '#' in program
 
         <td id="LC429" class="blob-code blob-code-inner js-file-line">                        #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                                               ^
 
I2Cdev.cpp:2213: error: stray '#' in program
 
         <td id="LC432" class="blob-code blob-code-inner js-file-line">                        #<span class="pl-k">endif</span></td>
 
                                                                                               ^
 
I2Cdev.cpp:2245: error: stray '#' in program
 
         <td id="LC440" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">endif</span></td>
 
                                                                               ^
 
I2Cdev.cpp:2254: error: stray '#' in program
 
         <td id="LC442" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:2316: error: stray '#' in program
 
         <td id="LC457" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:2334: error: stray '#' in program
 
         <td id="LC461" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                           ^
 
I2Cdev.cpp:2350: error: stray '#' in program
 
         <td id="LC465" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:2833: error: stray '#' in program
 
         <td id="LC584" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                           ^
 
I2Cdev.cpp:2865: error: stray '#' in program
 
         <td id="LC592" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:2873: error: stray '#' in program
 
         <td id="LC594" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">if</span> ((I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO < 100) || I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:2885: error: stray '#' in program
 
         <td id="LC597" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO >= 100)</td>
 
                                                                           ^
 
I2Cdev.cpp:2897: error: stray '#' in program
 
         <td id="LC600" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:2909: error: stray '#' in program
 
         <td id="LC603" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:2917: error: stray '#' in program
 
         <td id="LC605" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                               ^
 
I2Cdev.cpp:2929: error: stray '#' in program
 
         <td id="LC608" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">endif</span></td>
 
                                                                               ^
 
I2Cdev.cpp:2933: error: stray '#' in program
 
         <td id="LC609" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">if</span> ((I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO < 100) || I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE)</td>
 
                                                                               ^
 
I2Cdev.cpp:2941: error: stray '#' in program
 
         <td id="LC611" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO >= 100)</td>
 
                                                                               ^
 
I2Cdev.cpp:2949: error: stray '#' in program
 
         <td id="LC613" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE)</td>
 
                                                                               ^
 
I2Cdev.cpp:2957: error: stray '#' in program
 
         <td id="LC615" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">endif</span></td>
 
                                                                               ^
 
I2Cdev.cpp:2965: error: stray '#' in program
 
         <td id="LC617" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">if</span> ((I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO < 100) || I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:2973: error: stray '#' in program
 
         <td id="LC619" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO >= 100)</td>
 
                                                                           ^
 
I2Cdev.cpp:2981: error: stray '#' in program
 
         <td id="LC621" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:2993: error: stray '#' in program
 
         <td id="LC624" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:2997: error: stray '#' in program
 
         <td id="LC625" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                           ^
 
I2Cdev.cpp:3005: error: stray '#' in program
 
         <td id="LC627" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:3054: error: stray '#' in program
 
         <td id="LC639" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                           ^
 
I2Cdev.cpp:3086: error: stray '#' in program
 
         <td id="LC647" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:3094: error: stray '#' in program
 
         <td id="LC649" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">if</span> ((I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO < 100) || I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:3106: error: stray '#' in program
 
         <td id="LC652" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO >= 100)</td>
 
                                                                           ^
 
I2Cdev.cpp:3118: error: stray '#' in program
 
         <td id="LC655" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:3130: error: stray '#' in program
 
         <td id="LC658" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:3138: error: stray '#' in program
 
         <td id="LC660" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                               ^
 
I2Cdev.cpp:3150: error: stray '#' in program
 
         <td id="LC663" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">endif</span></td>
 
                                                                               ^
 
I2Cdev.cpp:3154: error: stray '#' in program
 
         <td id="LC664" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">if</span> ((I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO < 100) || I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE)</td>
 
                                                                               ^
 
I2Cdev.cpp:3166: error: stray '#' in program
 
         <td id="LC667" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO >= 100)</td>
 
                                                                               ^
 
I2Cdev.cpp:3178: error: stray '#' in program
 
         <td id="LC670" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE)</td>
 
                                                                               ^
 
I2Cdev.cpp:3194: error: stray '#' in program
 
         <td id="LC674" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">endif</span></td>
 
                                                                               ^
 
I2Cdev.cpp:3202: error: stray '#' in program
 
         <td id="LC676" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">if</span> ((I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO < 100) || I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:3210: error: stray '#' in program
 
         <td id="LC678" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE && ARDUINO >= 100)</td>
 
                                                                           ^
 
I2Cdev.cpp:3218: error: stray '#' in program
 
         <td id="LC680" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">elif</span> (I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE)</td>
 
                                                                           ^
 
I2Cdev.cpp:3230: error: stray '#' in program
 
         <td id="LC683" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:3234: error: stray '#' in program
 
         <td id="LC684" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">ifdef</span> I2CDEV_SERIAL_DEBUG</td>
 
                                                                           ^
 
I2Cdev.cpp:3242: error: stray '#' in program
 
         <td id="LC686" class="blob-code blob-code-inner js-file-line">    #<span class="pl-k">endif</span></td>
 
                                                                           ^
 
I2Cdev.cpp:3280: error: stray '#' in program
 
         <td id="LC695" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">if</span> I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE</td>
 
                                                                       ^
 
I2Cdev.cpp:3391: error: stray '#' in program
 
         <td id="LC722" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">if</span> defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__)</td>
 
                                                                               ^
 
I2Cdev.cpp:3411: error: stray '#' in program
 
         <td id="LC727" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)</td>
 
                                                                               ^
 
I2Cdev.cpp:3427: error: stray '#' in program
 
         <td id="LC731" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">else</span></td>
 
                                                                               ^
 
I2Cdev.cpp:3447: error: stray '#' in program
 
         <td id="LC736" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">endif</span></td>
 
                                                                               ^
 
I2Cdev.cpp:4084: error: stray '#' in program
 
         <td id="LC890" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">endif</span></td>
 
                                                                       ^
 
I2Cdev.cpp:4093: error: stray '#' in program
 
         <td id="LC892" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">if</span> I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE</td>
 
                                                                       ^
 
I2Cdev.cpp:6402: error: stray '#' in program
 
         <td id="LC1457" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">endif</span></td>
 
                                                                        ^
 
sketch\I2Cdev.cpp:6412:28: warning: missing terminating ' character [enabled by default]
 
   <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
 
                            ^
 
I2Cdev.cpp:6412: error: missing terminating ' character
 
   <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
 
   ^
 
I2Cdev.cpp:5: error: expected unqualified-id before '<' token
 
 <!DOCTYPE html>
 
 ^
 
I2Cdev.cpp:632: error: expected unqualified-id before '<' token
 
         <td id="LC46" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">"</span>I2Cdev.h<span class="pl-pds">"</span></span></td>
 
                                                                                                                                                       ^
 
I2Cdev.cpp:632: error: expected unqualified-id before '<' token
 
         <td id="LC46" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">"</span>I2Cdev.h<span class="pl-pds">"</span></span></td>
 
                                                                                                                                                                                                 ^
 
I2Cdev.cpp:654: error: expected unqualified-id before numeric constant
 
         <td id="LC51" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">if</span> ARDUINO < 100</td>
 
                                                                                                                         ^
 
I2Cdev.cpp:702: error: expected unqualified-id before numeric constant
 
         <td id="LC63" class="blob-code blob-code-inner js-file-line">        #<span class="pl-k">elif</span> ARDUINO > 100</td>
 
                                                                                                                           ^
 
I2Cdev.cpp:799: error: expected unqualified-id before '<' token
 
         <td id="LC86" class="blob-code blob-code-inner js-file-line">    TwoWire Wire;</td>
 
                                                                                       ^
 
I2Cdev.cpp:829: error: expected unqualified-id before '<' token
 
         <td id="LC93" class="blob-code blob-code-inner js-file-line">}</td>
 
                                                                       ^
 
I2Cdev.cpp:890: error: expected unqualified-id before '<' token
 
         <td id="LC108" class="blob-code blob-code-inner js-file-line">}</td>
 
                                                                        ^
 
I2Cdev.cpp:951: error: expected unqualified-id before '<' token
 
         <td id="LC123" class="blob-code blob-code-inner js-file-line">}</td>
 
                                                                        ^
 
exit status 1
stray '\302' in program
 
Link to comment
Share on other sites

  • 1 year later...

Hi, I'm Stefano and this is my first request on this forum.

I'm using the I2Clib with Arduino UNO (IDE 1.6.9).

I have a little board named MPU-92/65 on GY6500 with the following pins:

Vcc, GND, SCL, SDA, EDA, ECL, AD0, INT, NCS, Fsync

I have installed i2Clib and I am able to retrieve raw values (both acc. and gyro seem to work fine) on address 0x68 (AD0 low to arduino GND)

My only problem is that I get "MPU6050 Connection failed" when the MPU6050_raw calls accelgyro.testConnection().

In fact, I print on serial the result of accelgyro.getDeviceID() and it is 56...decimal number for 38 in hexa....

But afterwards values are printed (they change with orientation of board...it seems definitely working....).

the board can be found at http://www.robotpark.com/GY-521-MPU6050-6-Axis-Gyroscope-Acceleration-Sensor-Module

Should I be worried that the connection test failed (values not reliable) or should I just ignore it?

Thank you in advance

Stefano

 

Link to comment
Share on other sites

  • 1 year later...

Hello guys

i am new to arduino i am using the pro mini with the MPU 6050 

the code i am using is the raw data from https://playground.arduino.cc/Main/MPU-6050#short first i was facing the same problem the values on the serial monitor were all -1 

i tried pull up resistors on SCL and SDA but didn;t work

then to connect AD0 to GND aslo the same but when i connect AD0 to Vcc (5V) it worked but not completely 

i am getting values and they are changing but i am getting gibberish characters on the serial monitor as well 

Any suggestions to fix the problem

Thanks in advance

serialmon.png

Link to comment
Share on other sites

  • 2 years later...

Hey!

when i run the raw program 

first it shows this - 

Initializing I2C devices...
Testing device connections...
MPU6050 connection failed

and then stars printing values hows this possible ? it says that connection failed but then prints the value

a/g:    -108    724    16704    747    765    -258
a/g:    -120    752    16608    758    767    -231
a/g:    -116    752    16728    785    790    -244
a/g:    -148    708    16748    766    782    -232

 

Please help me

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...