Questions tagged [gyroscope]

A gyroscope is a device for measuring or maintaining orientation, based on the principles of angular momentum. Modern high-end Mobile devices have been supplying this device.Thus, many uses are found in Android API and iOS API.

Filter by
Sorted by
Tagged with
0 votes
0 answers
46 views

Calculating precise heading using raw magnetometer, accelerometer and gyroscope data

I have a IMU that consists of a magnetometer, accelerometer and gyroscope, each producing raw X, Y and Z readouts. (My magnetometer is BMM150) From this I need to determine a precise heading in ...
Arturex's user avatar
0 votes
0 answers
36 views

Simulating Gyroscope with ARW, BI, and Spectral Density Using Physical IMU Data

I'm currently working on a state estimation project that relies on IMU data. While I have access to a physical IMU, I'd like to simulate gyroscope data with specific parameters, including Angle Random ...
user3106378's user avatar
0 votes
0 answers
38 views

MPU6050 raw z-axis data is always zero

I am using MPU9250 for my projects. From datasheet I could see I need to read 6 bytes to get the accelerometer data. The 5th and 6th byte corresponds to z-axis high byte data and z-axis low byte data. ...
rockstar's user avatar
1 vote
2 answers
100 views

How to know if mobile is tilted upward or downward in Android?

I am making an game where I need to know if the phone is tilted upward (towards sky) or tilted downwards (towards ground) when in landscape. I have used this answer Answer Link as my starting point. ...
Vikalp Ranjan's user avatar
0 votes
0 answers
111 views

How can I have Android on the RasPi with Accel/Gyro?

For a project, I want to use a Raspberry Pi (or similar) running Android. Just using a mobile device is not an option (due to ruggedness, always-on, breakout-options etc.) The other thing my project ...
isync's user avatar
  • 537
-1 votes
1 answer
34 views

run ADIS16465-1BMLZ on raspberry pi 4 with kuiper linux

How can I save data from ADIS16465-1BMLZ on raspberry pi 4 with kuiper Linux in a .CSV file for a specific period, let's say 5 minutes? Is this achievable? I connected the ADIS16465-1BMLZ module to ...
Ali Taheri's user avatar
1 vote
0 answers
34 views

How to ensure stability on all device that can use the Android TYPE_GAME_ROTATION_VECTOR sensor

I am using TYPE_GAME_ROTATION_VECTOR as sensor in Android project. However, on some devices (Example S22 Ultra), I saw a difference in rotation angles from the sensor. For example, while most devices ...
Sina's user avatar
  • 31
0 votes
0 answers
139 views

MPU6050 Quaternion calculation with stm32

I've been interested in mpu6050 for a while. I can read gyro data but i need help how to convert it to quaternion. This is pretty easy on Arduino, jrowberg's library is really great. But i am working ...
f.cerkesli's user avatar
0 votes
0 answers
64 views

Unity iOS gyroscope always returns constant value

I'm reading the gyroscope on a Unity iPhone app but however I move the phone it returns the same value it returns is always the constant value of (0.00000, 0.00000, 0.70711, -0.70711). I'm reading it ...
Tim MB's user avatar
  • 4,433
0 votes
1 answer
44 views

Blocking the movement of the gyroscope along the Y axis (Unity)

I'm making a game where by tilting my smartphone I can rotate an object in the z-axis. I made sure that the rotation is correct at different angles of the smartphone, but the problem is that if you ...
Operator's user avatar
0 votes
1 answer
40 views

Values in variables not displaying on Serial monitor

Trying to read mpu 6050 accelerometer,gyroscope values on serial monitor through uart on a stm32g431cbt6 board. The string gets printed except for the values which remain at zero. Serial Monitor ...
JKx's user avatar
  • 1
0 votes
0 answers
27 views

Lock rotation when moving the smartphone in the space for the gyroscope

I’m using this code to rotate an object bg on the z-axis using a gyroscope: Quaternion eliminationOfXY = Quaternion.Inverse( Quaternion.FromToRotation(referenceRotation * Vector3.forward, ...
Operator's user avatar
0 votes
1 answer
120 views

Problem with object rotation when using gyroscope in Unity

I use this code to track the movement of the gyroscope and rotate the object: Vector3 previousEulerAngles = transform.eulerAngles; Vector3 gyroInput = -Input.gyro.rotationRateUnbiased; ...
Operator's user avatar
0 votes
0 answers
34 views

Detect if a device is rising or falling regardless of device orientation

I'm developing a PWA using Capacitor.js, that calculates the rate of rising/falling of the device in meters per second. I'm using Capacitor's Motion plugin, but I'm unsure how to perform the ...
Mez's user avatar
  • 61
0 votes
0 answers
57 views

Complementary filters-STM32

I want to use the complementary filter to get the roll and pitch angles using an IMU sensor with an stm32l4+ microcontroller but get (nan(0x400000). I get some values at first then it shows nan. this ...
bassem abidli's user avatar
0 votes
1 answer
253 views

How to add a gyroscope control binding to Input Actions panel in Unity's new Input System

I would like to add gyroscope/accelerometer control binding to the Input Actions panel in Unity's new input system. On the Input Actions panel, I see we can bind all kinds of inputs from game ...
TheyCallMeTJ's user avatar
1 vote
0 answers
81 views

Distance calculation when accelerometer and gyroscope work in Unity

I am testing accelerometer and gyroscope in unity. In my game, 3d balls from the center of the screen fly to the target behind the screen (the target is an empty gameobject with adjusted coordinates). ...
Operator's user avatar
0 votes
0 answers
58 views

convert accelerometer and gyroscope data from an Arduino into an iOS SCNNode position and rotation

Context: I have an Arduino Nano RP2040 Connect device which has a built-in IMU. I also have written an iOS app that utilizes SceneKit and can render/animate SCNNodes. Goal I want to move my Arduino ...
stanley's user avatar
  • 1,133
0 votes
1 answer
48 views

Complimentary filter for Xsens sensor

I am trying to fuse Xsens MTi-20 sensor gyro with accelerometer using complementary filter, calculated angle looks okay, at least i think so, but the problem is that when sensor in not moved values ...
Chris_xx's user avatar
0 votes
2 answers
83 views

Attitude estimation using the unscented Kalman filter

I'm trying to determine the attitude of a rigid body in R3 fusing the data coming from an accelerometer, a gyroscope and a magnetometer. I've taken the UKF algorithm as written in the book "...
Antonio Vscm's user avatar
1 vote
0 answers
224 views

Gyro controls in Unity (Android) - setting an initial offset OR achieving consistent results with rotationRateUnbiased

I want my game's control scheme to assume the position in which the phone is held at the start of the game as the default around which the gyroscope then rotates around. As far as I can tell, there ...
IDKJustLetMeAskMyQuestions's user avatar
0 votes
0 answers
353 views

Google Pixel 6 Pro Gyroscope and Accelerometer issue

The Gyroscope and Accelerometer sensors are defective. As a result, features that require these sensors do not work such as Auto-rotate, Compass, Flip to shh, Flip camera for selfie and games that ...
Grecko's user avatar
  • 1
1 vote
0 answers
210 views

Getting CHIP_ID from BMI_270 using SPI Interface from Arduino IDE

Fundamentally I'm trying to extract Accel and Gyro values from the sensor using SPI interface. However there are limited support for BMI270 available online, so I'm now reading the values using ...
Dian Basit's user avatar
1 vote
1 answer
115 views

Detect the speed of the vehicle using MPU6050

i have been trying to get speed of the vehicle using MPU-6050 but couldn't find my way to do it so, in the end i am stuck here def stateCondition(): while True: acc_x = read_raw_data(ACCEL_XOUT_H) ...
Abhisek Pandey's user avatar
0 votes
0 answers
39 views

Accelerometer Uncalibrated gives different values when also registering to Gyro Uncalibrated

I found out the weirdest thing. I'm dumping SensorEvent.values[2] to the console and when I'm just registered to the Uncalibrated Accelerometer this hovers / averages around 9.84 (slightly off on this ...
HerbertV's user avatar
  • 113
0 votes
1 answer
26 views

How to prevent FPS from impacting the interpretation of gyroscopic data (rad/sec)

I am using Unity to create a game, and using an android phone as a controller. The phone is functionaning as a websocket server that the unity app is connecting to and listening for the gyroscope ...
Stumpy's user avatar
  • 1
0 votes
0 answers
118 views

Android sensor logs accelerometer calibrated and gyroscope calibrated return constant values everytime

When I tried to log some values from Android sensor for calculation, testing on Xiaomi Mi A1, Galaxy S21 Ultra 5G, the results for accelerometer calibrated are always 0, 0, 0 even if i move the device,...
Duc Nguyen's user avatar
0 votes
1 answer
147 views

Arduino/Wokwi buzzer activates on digitalWrite(LOW) too

I am trying to make a buzzer play when the gyroscope attached to the Arduino passes a certain rotation threshold on the x axis. The problem is: it also activates when I simulate to go back under the ...
rikyeah's user avatar
  • 1,918
1 vote
0 answers
51 views

What Sensor Fusion algo is google AOSP using? See the source code here

I'm looking into Googles code here: https://cs.android.com/android/platform/superproject/+/master:frameworks/native/services/sensorservice/Fusion.cpp;bpv=0;bpt=0 For the experts: what algorithm is ...
HerbertV's user avatar
  • 113
0 votes
0 answers
131 views

micro:bit calculate yaw on maqueen

Basically, I need use micro:bit accelerometer to move straight forward avoiding curved movements. So far I have calculated roll and pitch using the code below X = Sensors.acceleration(Sensors.X) / ...
Giannis Tzagarakis's user avatar
0 votes
1 answer
75 views

How can I calculate the angle between my phone and another lat long?

I am working on a application that points at a place. I have the latitude and longtitude of my phone and the place I want to point at. And I have never worked with a gyroscope. I hope to create a ...
Jordy's user avatar
  • 37
0 votes
1 answer
41 views

how to plot forward/backward tilt on y axis?

I have a line (UIView with width = screen width and height = 2), I need to move this line up and down the screen with forward tilt and backward tilt. I know I need to use Gyroscope, how can I achieve ...
nitpaxy's user avatar
  • 67
1 vote
0 answers
66 views

Data fusion to compute the Pitch, Roll and Yaw on the LSM6DS3TR Adafruit breakout board

I have a Adafruit LSM6DS3TR-C breakout board connected to a Pic micro-controller via I2C. I having trouble trying to find an example on the internet or the ST/Adafruit website, of how to calibrate the ...
kaygee's user avatar
  • 11
0 votes
1 answer
87 views

How to detect orientation with accelerometer while vehicle has variable acceleration?

According to my research, I saw that, in order to detect the angular orientation AHRS uses gyro and accelerometer. Only gyro does not work well because of integration drift. Only accelerometer also ...
Mert Celik's user avatar
1 vote
0 answers
289 views

How can I get an accurate relative yaw angle from a 6DOF IMU like the LSM6DS3 with minimal gyro drift?

I currently have a platform that has a 6DOF IMU (the LSM6DS3) with no magnetometer. I want to get as accurate of a relative yaw angle reading as possible, avoiding or minimizing any gyro drift. I ...
Joe's user avatar
  • 11
0 votes
1 answer
536 views

Could not find a valid MPU6050 sensor

I am using the below code with arduino-uno, but often getting "Could not find a valid MPU6050 sensor #include <Wire.h> #include <MPU6050.h> MPU6050 mpu; void setup() { Serial....
Kamalesh P's user avatar
1 vote
0 answers
143 views

Android: gyroscope sensor data return zero (onSensorChanged())

I am creating an application to get accelerometer sensor and gyroscope sensor data from Android Wear(galaxy watch 4) However, only gyro sensor data returns zero. Could you please solve this problem? ...
jjjj's user avatar
  • 11
-2 votes
1 answer
386 views

Reading SPI gyro values from IIM-42652

Has anyone on here ever used a IIM-42652 before? I am trying to communicate to it but have trouble reading gyroscope values. I have verified all the SPI signals on both MISO and MOSI lines, alongside ...
bittabuket's user avatar
1 vote
0 answers
161 views

Using MadgwickQuaternionUpdate algorithm with 9 DoF IMU

So I've been playing around with OpenLog Artemis that has ICM-20948 IMU. I want to calculate absolute coordinates using that 9DoF IMU (it provides me with an accelerometer, gyro, and magnetometer data)...
Filip Vuković's user avatar
0 votes
0 answers
298 views

Improve compass heading calculations using 9DoF IMU

I've been implementing a compass using raw data from a ICM-20948 IMU. It provides me with Accelerometer, Gyro, and Magnetometer data, but I've been using only Accelerometer and Magnetometer data to ...
Filip Vuković's user avatar
1 vote
0 answers
683 views

Manipulating Switch Gyro controls with a mouse via USB Gadget

Maybe I'm looking at this from the wrong angle, but I found code from a Japanese blog that translates the pro controller's gyro controls on switch to a mouse. One problem with this is that the ...
iAyeCaptainKai's user avatar
1 vote
0 answers
38 views

Android Accelerometer event interpretation

I'm trying to figure out in what direction (roughly) a phone has moved over a period of a couple of seconds. Is it possible ? I'm using the gyroscope to track what direction the phone is facing. This ...
Werner Scholtz's user avatar
1 vote
1 answer
250 views

Raspberry GY-271 HMC5883L Errno 121

I just can't read my GY-271 HMC5883L module. I always get "OSerror: [Errno 121] Remote I/O error" as an error. Can someone help me here? Traceback (most recent call last): File "test....
Toni's user avatar
  • 25
0 votes
1 answer
122 views

how to build gyroscope above the current phone direction

public class GyroControl : MonoBehaviour { private bool gyroEnabled; private Gyroscope gyro; private GameObject cameraContainer; private Quaternion rot; private void Start() {...
Hany.'s user avatar
  • 3
0 votes
0 answers
255 views

How to avoid gimbal lock using device orientation to move camera position in ThreeJS?

I'm trying to use the browser's deviceorientation to move a camera in a ThreeJS scene, but am unable to avoid gimbal lock when beta hits 90. I've created a demo site here: https://mattparrilla.github....
Matt Parrilla's user avatar
0 votes
0 answers
280 views

Trying to get acceleration using Accelerometer And/Or Gyroscope

I am creating a project on react-native (I'm a newbie) I'm trying to understand the data I'm getting from this code Expo documentation (code available) Main goal to get the acceleration and direction ...
Riadh-Saad's user avatar
0 votes
1 answer
315 views

Is there a way to simulate gyroscope movement on Android?

I want to simulate gyroscope shaking movement to get steps in health app. Is there a way to achieve this on my phone or on an emulator?
Nikita's user avatar
  • 31
-1 votes
2 answers
425 views

Exactly which library are we supposed to use if we want Roll, Pitch and Yaw data from the ISM330DLC acc and gyro sensor?

Currently, I'm working on a project where my job is to take Accelerometer, Gyroscope data and convert it into Roll, Pitch and Yaw. So to achieve this we started working on the ISM330DLC sensor. To get ...
Omkar Dixit's user avatar
0 votes
1 answer
157 views

What should be the reason for not getting output from the MOTION GC library?

I'm working on the "STEVAL-MKI182V2" mounted on the STEVAL-MKI109V3 development board. Initially, I downloaded the Standard c Drivers from the following link https://github.com/...
Omkar Dixit's user avatar
1 vote
1 answer
437 views

How to generically track relative position, velocity and orientation from IMUs?

For a light painting project (could be s.th. else, too) I'd like to calculate relative position, orientation and velocity from 6-axis IMUs (I have a MPU6886 connected to an ESP32, but I hope, that ...
frans's user avatar
  • 9,118

1
2 3 4 5
17