Jump to content
I2Cdevlib Forums

Recommended Posts

Hey there - I've been using the I2CDevlib MPU6050 code for about 18 months in the development of a new flight control system (I know what some of you are thinking - oh god ANOTHE flight control thingy...)

 

Anyways, in optimizaing the code, I've found that the MPU6050 type is munching ~1200 bytes of RAM :o Which on a standard ATMega328 is almost 60% of all its RAM. The older flight computers used a cluster configuration that talked over I2C so we could just dump the mpu handling code in there and have the other ATMegas do the reast. This isn't ideal since its unreliable, bulky (and so on). I had a skim of the source and not found anything that my reasonably poor C skills can pick out as a stick out memory hog.

 

So in short - is there anything that I can remove from the MPU6050 class to make it use less memory? The only data I am interested in is roll, pitch, yaw angles as well as accleration on the X, Y & Z axes. However if it would save a reasonable amount of memory, the acceleration data could be replaced by using data from other sensors onboard the aircraft.

 

Cheers,

code

(and sorry if this first post isn't in quite the same style as other posts, do feel free to edit and whatnot).

 

Link to comment
Share on other sites

Cheers for that. My current 'solution' has been to bump of all the code onto a 2nd ATMega and then network them over I2C as that ironically works out with much lower resource usage on the main ATMega. Though it would still be really nice to not have to jump through so many hoops.

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...