sure it's helpful and more. this is the situation I am confronting most of the time, and when I see that I don't understand all the code, I abandon it. So, from now on, I will explore what fit me in any code I encounter and use it diligently. thank you for wakening me up😉
Nice and interesting! If we take one axis of the three axes, for instance the X-axis, then a zero value is for the horizontal position. A negative value (-1 to - 128) may represent a counter clockwise position and a positive value (+1 to +127) may represent a clockwise position. the same is true for the Y and Z axes. Notice that (-128 to +127) is 255. Thank you
Damn i had the same idea before... Maybe we can put in a code that detects the max and min values of the X,Y,Z ranges. Then map the values to make the mapping is tight
Very nice production value on the video! Any plans on visualizing the sensor output using Unity? I've seen some projects that do it, but I ''just dont' know' enough to implement it myself correctly! This is my code: void SetPosByAngle ( float fPitch, float fRoll ) { Vector3 LowerLimit = new Vector3(0, 0, 0); Vector3 UpperLimit = new Vector3(180, 180, 180); // Normalize from -180/+180 to -1/+1 fPitch = (fPitch) / 180.0f; fRoll = (fRoll) / 180.0f; Vector3 AngleDiff = UpperLimit - LowerLimit; Vector3 CalculatedAngle = new Vector3(-fPitch * AngleDiff.y, 0, -fRoll * AngleDiff.x); TragetAngle = LowerLimit + CalculatedAngle; transform.localEulerAngles = TragetAngle; } Where the angles sent to the function above are calculated via: fPitch = (float) (Math.Atan2(YAxisAccelerationData,ZAxisAccelerationData)+M_PI)*RAD_TO_DEG; fRoll = (float) (Math.Atan2(ZAxisAccelerationData, XAxisAccelerationData)+M_PI)*RAD_TO_DEG; Unfortunately, my object moves across the screen, rather than pitching/tilting at the center of the screen. Apparently the solution to drift is to project a reference frame, but would love to see a how-to! gamedev.stackexchange.com/questions/140141/unity-3d-recreation-of-pitch-roll-from-accelerometer answers.unity3d.com/questions/416169/finding-pitchrollyaw-from-quaternions.html forum.unity3d.com/threads/roll-pitch-and-yaw-from-quaternion.63498/
****If you like this, I think you'll like the premium Arduino training we offer. You can check it out here**** bit.ly/3lHyzcB
sure it's helpful and more. this is the situation I am confronting most of the time, and when I see that I don't understand all the code, I abandon it. So, from now on, I will explore what fit me in any code I encounter and use it diligently. thank you for wakening me up😉
Nice and interesting!
If we take one axis of the three axes, for instance the X-axis, then a zero value is for the horizontal position. A negative value (-1 to - 128) may represent a counter clockwise position and a positive value (+1 to +127) may represent a clockwise position. the same is true for the Y and Z axes. Notice that (-128 to +127) is 255.
Thank you
Thanks for the great videos
Damn i had the same idea before...
Maybe we can put in a code that detects the max and min values of the X,Y,Z ranges.
Then map the values to make the mapping is tight
Very nice production value on the video!
Any plans on visualizing the sensor output using Unity? I've seen some projects that do it, but I ''just dont' know' enough to implement it myself correctly! This is my code:
void SetPosByAngle ( float fPitch, float fRoll )
{
Vector3 LowerLimit = new Vector3(0, 0, 0);
Vector3 UpperLimit = new Vector3(180, 180, 180);
// Normalize from -180/+180 to -1/+1
fPitch = (fPitch) / 180.0f;
fRoll = (fRoll) / 180.0f;
Vector3 AngleDiff = UpperLimit - LowerLimit;
Vector3 CalculatedAngle = new Vector3(-fPitch * AngleDiff.y, 0, -fRoll * AngleDiff.x);
TragetAngle = LowerLimit + CalculatedAngle;
transform.localEulerAngles = TragetAngle;
}
Where the angles sent to the function above are calculated via:
fPitch = (float) (Math.Atan2(YAxisAccelerationData,ZAxisAccelerationData)+M_PI)*RAD_TO_DEG;
fRoll = (float) (Math.Atan2(ZAxisAccelerationData, XAxisAccelerationData)+M_PI)*RAD_TO_DEG;
Unfortunately, my object moves across the screen, rather than pitching/tilting at the center of the screen. Apparently the solution to drift is to project a reference frame, but would love to see a how-to!
gamedev.stackexchange.com/questions/140141/unity-3d-recreation-of-pitch-roll-from-accelerometer
answers.unity3d.com/questions/416169/finding-pitchrollyaw-from-quaternions.html
forum.unity3d.com/threads/roll-pitch-and-yaw-from-quaternion.63498/
How can we connect two accelerometer at the same time with arduino ?
Thanks
Hello, im having trouble controlling the direction and speed of servo motors using the output values from this accelerometer, any suggestions ?
Can you use this with a different accelerometer? If I have ADXL335 would the libraries still work etc?
can you please suggest some other projects with adxl345
how to make a vibration velocity measurement using adxl345 ?
please, help me
instead of the triple accle accelrometere you could name the video how to make use of arduino software
Hi Michael, if you need to reflow a board try a heat gun, you got a cute kid too. mike