Pages: [1]   Go Down
Author Topic: Help please withMPU 6050 sketch error codes  (Read 885 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi...I have an Arduino Duemilanove and an MPU6050 bought from EBAY.  I have been trying various published sketches to get some useful info out of this IMU without any success.  I want to use the 6050 to build an electric unicycle...I am good with engineering and electronics but fall down badly with programming:-(( 

I have the VCC connected to 3.3v, GND to GND, SCL to Analogue pin 5 and SDA to analogue pin 4 and lastly INT to digitalpin 2.

I have just come across what looks like a "simple" way to get a 3d cube moving in repsonse to the 6050 but cannot get the sketch to compile....this is the link to the You tube vid...http://youtu.be/MSWkyjHze4k.  When I try to compile I get these messages.......

java.io.IOException: Target platform: "null" not found.
Make sure that "build.target" in the
preferences file points to a subdirectory of
C:\arduino-0017\arduino-0017\hardware\cores
   at processing.app.debug.Target.<init>(Target.java:49)
   at processing.app.Editor$43.run(Editor.java:1751)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)

I've looked all over for build-target but can't find it...anyone help me on this...be very grateful...cheers  Gerry
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Download the newest Arduino software. Version 1.0.4 at the moment.
If the sensor board has a voltage regulator, you could use 5V.
Run the i2c scanner.
Use the I2CDevlib. Trust no other libraries for the MPU-6050.

http://arduino.cc/en/Main/Software
http://playground.arduino.cc/Main/I2cScanner
http://www.i2cdevlib.com/
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi...thanks for the links.  I have uploaded the later firmware without problem.  Also ran the I2C scanner and it found the MPU 6050 - great!  Then it all goes downhill again.  I have the MPU6050_test sketch which compiles fine but when I upload it never 'finishes' uploading..gets to within 2 bars and just stays uploading.  Tried few other sketches I have downloaded but all have some sort of problem compiling.  One thing I noticed is that when uploading the test sketch it says Arduino Uno on Com 5 where mine is a duemilanove...is this relevant?  Would love to get the teapot sketch to work but just banging my head at the moment??  Can anyone point me to a sketch that works? Thanks a lot........Gerry
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is your Duemilanove with a ATmega328 ?

This is a simple small test, http://playground.arduino.cc/Main/MPU-6050
If the i2c scanner is working, that sketch should also work.

But really, the I2CDevlib code is the only valid working code for the MPU-6050 on the planet.
« Last Edit: March 29, 2013, 05:08:37 am by Erdin » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Erdin..yes I have the Atmega 328.  I tried the sketch and I think it works...I see a lot of scrolling numbers that change when I move the IMU but they dont really mean much.  I would like to get some sort of 3d motion on the screen relative to moving the IMU (which I found out is a GY521 and does have a voltage reg built in)....or some angle measurements in 0 to 90 degree figures.

As I said, I want to build a unicycle and presume I only need one axis from the accelerometer and giro and combine the two to control the motor in response of angle change.  There is a lot of code for segway type models but all seem to be for the old analogue sensors....I am struggling to find similar code for the digital 6050 6DOF board.

I am grateful for your help so far...any other suggestions welcome!!
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have this sketch running, http://playground.arduino.cc/Main/MPU-6050 ?
The next step the code by Jeff Rowberg, http://www.i2cdevlib.com/
You have to connect the interrupt to pin 2 of the Arduino.

Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3011
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks to me,  like you have a problem with the uploader to the Arduino.    This may be related to selecting the wrong Arduino model in the IDE.

I've had this problem before,  where the upload just fails for no obvious reason.   Eventually the problem goes away.  I don't think it is specifically related to the MPU6050 device.
Logged

Pages: [1]   Go Up
Jump to: