01-27-2014 10:31 PM - edited 01-27-2014 10:33 PM
Hi,
i have to read the gyro from gyroscope SN-imu5D-LC
when i rotate the sensor i could get the angle , but the problem when i stop the angle going to be zero
so actually i want to know how can i keep the angle when i stop moving ???
the reson why it going to zero because the output from the sensor is velocity so when i stop moving the velocity going to be zero so the value also go to be zero
01-28-2014 06:43 AM
Shift register on your While loop. A shift register is a way to pass data from one iteration to the next. You make one by right-clicking on the While loop and find the right menu item.
01-28-2014 06:52 PM
thatnk you for replying
when i use shift rigester
when i stop moving the value goes to be zero and the angle also
so i need the value before i stop moving
01-29-2014 06:58 AM
Are you storing the position in the shift register or the last read angles? If you store the position and then add the change in position, then the position shouldn't change when you stop moving.
01-29-2014 11:26 PM
thanks alot
can you provide me any explenation how to store data in shift register ?
thanks
01-29-2014 11:57 PM
untill this point i can get the change between the new value and the old value , how can i complete it ?
thanks
01-30-2014 06:49 AM
You don't want to subtract to get the change in angular velocity. You need to add. That will give you the current angle.
X0 +dX1 = X1. Your gyro is giving you dX1. You should initialize your shift register to be 0. Then add inside. Your shift register needs to hold the angular position.
01-30-2014 06:54 AM
in my programing
(analog_reading - ZERO reading)/ sensitivity = position
zero reading = the reading when angular velocity is 0
still not clear i hope if i can have more explanation
thanks