Notifications
Clear all

Trouble with MPU 6050 Code

Page 2 / 4

Will
 Will
(@will)
Noble Member
Joined: 1 year ago
Posts: 1929
 
Posted by: @robotbuilder

No I am not very skilled or knowledgeable and my experience is as a self taught occasional hobbyist in the  BASIC,  Assembler and C++ languages and basic electronics.

Well, in my opinion, you are all three.

I was kidnapped by mimes.
They did unspeakable things to me.


ReplyQuote
b
 b
(@b)
Prominent Member
Joined: 3 years ago
Posts: 912
 
Posted by: @will

@byron FYI @robotBuilder @quince

It's all up in the air right now:)

I downloaded the file for the "level" sketch from the OP's link and it doesn't require the MPU6050 library at all. But it DOES require one of the liquid crystal I2C libraries (the one that defines POSITIVE) which I don't have, so I can't compile it.

I have also downloaded the MPU6050 library (again as per the OP's link in a post above) but haven't installed it since it didn't seem to be required.

I did try to download the I2C library from the OP's post but all I got was a second copy of "mpu-6050-level.ino"

I haven't looked at anything in DronebBot-Workshop because all I was starting to do was try to get quince able to compile the (original mpu-6050-level.ino) sketch.

 

So it doesn't  (require the mpu6050 library that is).  So @quice could check the mpu6050 hookup by modifying the sketch to remove the code relating to the liquid crystal and replacing it with a few Serial.print() 's to get started with.  A nice little exercise for a new coder. 👍 😀 


Inst-Tech liked
ReplyQuote
Quince
(@quince)
Eminent Member
Joined: 8 months ago
Posts: 35
Topic starter  

(@robotbuilder)

(@byron)

(@will)

WOW , Thank you all for coming to my aide. You amaze me with your support. It is apparent that to use an old term" I am fighting above my weight". I is also apparent that I need to do some reading. Anyone know where I can buy Arduino book like Programming for Boomers, or perhaps, How to fry the last brain cell in a mid-sixty mind All  kidding aside any suggestions on a VERY basic step by step book would be welcome.

I will continue to work with the program, it is perfect for a  project I have in mind , using the signals to control severs or liner actuators to auto-stabilize/level a platform. I picked this one of several because the MPU 6050 and sketch was going  to do the math making the set-up simple. Oops. If anyone is aware of a similar program that can accomplish the same goals, without making a greenhorn brain dead or finds the fault with this program, I would appreciate hearing about it.

I also know that mistakes is where you learn. This reminds me of a 3HP Briggs on a go-kart I had when I was eight. One day it just quit, I spent days trying to figure it out what happened with limited knowledge. My father ( MIT grad) seeing my frustration came down the driveway I thought I was saved, he was going to help, instead he gave me a piece of advice that has served me well my entire life. Handing me a small engine repair manual he said" It is a proven design, it has ran before, if you find the problem, it will run again". He turned and walked away. I found the problem the next day. I know I'm not going to find this the next day, but l unless Bill in the video is using special effects it ran once.

Happy Holidays, Thanks again and please forgive the ramblings of an old man. Quince


Inst-Tech liked
ReplyQuote
Quince
(@quince)
Eminent Member
Joined: 8 months ago
Posts: 35
Topic starter  

(@robotbuilder)

If all it takes is an MPU6050 to solve this problem, please send me your address I'll have one overnighted. LOL Quince


ReplyQuote
b
 b
(@b)
Prominent Member
Joined: 3 years ago
Posts: 912
 
Posted by: @quince

any suggestions on a VERY basic step by step book would be welcome.

You could have a look at this free to download book to see if its what you require. Its a good introduction to getting started on programming with the Arduino IDE.

https://hackspace.raspberrypi.com/books/arduino


Inst-Tech liked
ReplyQuote
Quince
(@quince)
Eminent Member
Joined: 8 months ago
Posts: 35
Topic starter  

Hi All, I am still working with the MPU6050. I have not been able to get the drone bot workshop electronic light level sketch to work.

I did find a sketch titled;

DIY Gimbal - MPU6050 Arduino Tutorial

by Dejan, www.HowToMechatronics.com

Code based on the MPU6050_DMP6 example from the i2cdevlib library by Jeff Rowberg:

https://github.com/jrowberg/i2cdevlib

This is a 3 axis self leveling gimble platform using the mpu6050.

 

Both sketches use the Jeff Rowberg  i2cdevlib library.

The  Drone Bot Workshop electronic level will not compile.

The DIY Gimbal will compile and upload but will not display on the monitor and so is it working?

 

Trying to determine if I had a bad MPU 6050 I loaded the I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class using DMP (MotionApps v2.0)// 6/21/2012 by Jeff Rowberg <jeff@rowberg.net>

 

It work Perfect.

 

Is it possible to cut and paste the servo control section from the DIY Gimble Sketch and load it on to the

Arduino sketch for MPU6050 class using DMP by Jeff Rowberg? or am i just missing something simple on the output for the serial monitor and the DIY gimble sketch is working fine. Any Ideas?


ReplyQuote
azflyer
(@azflyer)
Active Member
Joined: 2 years ago
Posts: 14
 

Sorry but I am so cluless about how to use forum. But my question is when I tried to complie the sketch I get an error massage saying "posetive was not defined on this sketch". I am not sure what it even means let alone how to fix it. Any help would be great. Please if any one answers tto this post let me know how can I view the reply.  Thanks in advance.


ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 2755
 

@azflyer As far as using the forumn, two places to start are the help pages and the Test Forum. I attached pictures of what they look like. Also make sure you are subscribed to whatever you are interested in.

Also for your compile problem do a screen print, do NOT try to type the error message because then we might be trying to fix your typo instead of the real problem.

If you don't know what it means for a variable not defined, then download a book about programing in C and practice for a while before trying again. You will learn that if you mis-spell a variable name, the compiler will not guess the right name, the compiler is extremely literal.

When you have done all that, start a new question for your issue in the appropriate forum/sub-forum.

Good luck.

 

 

Screen Shot 2022 05 23 at 06.12.22
Screen Shot 2022 05 23 at 06.12.43

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
azflyer
(@azflyer)
Active Member
Joined: 2 years ago
Posts: 14
 

Sir, I truly appricate you took your time to reply to my question. I am NOT a programer at all. In my college days my lowest grade was in programing. I design, build and fly radio controlled planes. Here's a short video of my design in flight.

If I can cute it, drill it, sand it, heat it, cool it, I can make it work. But programing some thing is NOT my forte'.Yes I am from analog days of electronic from fourty plus years ago. The reason I wanted to build this electronic level is because I truly admire Mr. Bill's work, knowladge and efforts. So I decided to build this project.

 

Thanks for reading this,

azflyer


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 3 years ago
Posts: 1156
 
Posted by: @azflyer

Sorry but I am so cluless about how to use forum. But my question is when I tried to complie the sketch I get an error massage saying "posetive was not defined on this sketch". I am not sure what it even means let alone how to fix it. Any help would be great. Please if any one answers tto this post let me know how can I view the reply.  Thanks in advance.

@azflyer,

Notice the "at" (@) symbol in front of your username.  When you reply to someone, if you put the "@" symbol in front of their username they will get an email that someone has replied to their post.  As you should have seen an email that I had replied to the post quoted in this reply.

Also, did you define the variable as "positive" and then later misspell it as "posetive"?

SteveG


Inst-Tech liked
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 2755
 

@azflyer I hate to sound like a broken record but you need to read and understand the Forum help section then use the forum practice sections to get familiar with the forum. If you only go back 40 years, I consider you a yung un, I started with analog well before that, so there is hope.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
YurkshireLad
(@yurkshirelad)
Reputable Member
Joined: 2 years ago
Posts: 461
 

@azflyer - if this is your error message then check the spelling of the variables in your code. You may have mistyped "positive" and written "posetive" instead.

"posetive was not defined on this sketch"


ReplyQuote
azflyer
(@azflyer)
Active Member
Joined: 2 years ago
Posts: 14
 
Screen Shoot

Here's the screen shot.


ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 2755
 

@azflyer Sorry, not enough info there. I will find that sketch and try to compile it myself.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 2755
 

@azflyer Sorry, not enough info there. I will find that sketch and try to compile it myself.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
Page 2 / 4