Vinh's Content - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Vinh's Content

There have been 2 items by Vinh (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#48230 MPU 6050 Data are not constant

Posted by Vinh on 09 April 2013 - 10:47 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Heroduino,

 

I found a solution to the problem. Here is:

 

  while (true)   {   // Blink LED   led.Write(!led.Read());   Thread.Sleep(1); // Sleep 1 milisecond   led.Write(!led.Read());   // read sensor state   data = sensor.GetSensorData(); // set a string with the values from sensor   string str =   "aX: " + (Int16)data.Acceleration_X + "t; " +   "aY: " + (Int16)data.Acceleration_Y + "t; " +   "aZ: " + (Int16)data.Acceleration_Z + "t; " +   "gX: " + (Int16)data.Gyroscope_X + "t; " +   "gY: " + (Int16)data.Gyroscope_Y + "t; " +   "gZ: " + (Int16)data.Gyroscope_Z + "t; " +   "T: " + (Byte)((Int16)data.Temperature / 340 + 36.53);     // Debug Output   Debug.Print(str);   Thread.Sleep(500); // Sleep .5 second   }




#48157 MPU 6050 Data are not constant

Posted by Vinh on 07 April 2013 - 08:54 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello,

 

According to specifications, all measurements output of the MPU6050 are in the form 16-bit 2’s complement value (Int16).

 

Int16 values range from -32768 to 32767.

 

The results you shown have values outside that range.

 

I run your codes and get the same result but I don't know C# enough to fix it.

 

Let me know if you find a solution.

 

Regards

 

Vinh





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.