MiniIMU 9 v3

Hallo all,

I recently bought myself a MiniIMU 9 v3, I downloaded a library (L3G) for my Arduino and i get 3 ax cell readings but they vary a lot. I need to Zero the reading as close as possible for my project to work. Can you please guide me with steps what i must do? And i am struggling to edit the registers? I do have the register map and some keywords but my programming does not seem to be up to date. The sketch is down below.

[code]#include <Wire.h>
#include <L3G.h>

L3G gyro;

void setup() {

if (!gyro.init())
Serial.println(“Failed to autodetect gyro type!”);
while (1);


void loop() {;

Serial.print("G ");
Serial.print("X: “);
Serial.print(” Y: “);
Serial.print(” Z: ");


Your response will be highly appreciated


“vary a lot” does not mean much. Are you moving the sensor? What sensitivity setting is the default? What ARE the numbers that you see?

To understand what the numbers mean, you need to go through the data sheet and learn how to interpret the numbers in terms of degrees/second of rotation.

Then, consider that all gyros have zero offsets, and those offsets drift with time and temperature. To cancel the zero offsets for a short period of time, you need to record a number of readings for each axis with the gyro motionless, compute the average, and then subtract that average from subsequent readings.

Google will probably reveal some introductory material.

Hello, Jaco.

Our LSM303 and L3G libraries have functions that allow you to write to registers. You can learn more about those functions by reading the README.textile, which is on the GitHub pages I linked to, or by reviewing the code in the folders at the top of those pages.


Hallo Jon

What i mean about “vary a lot” is in a stationary position it jumps from say 20 to 100. It can be noise and I know that it would not be a perfect zero because of temperature and other reasons but i need it to be as close as possible. Some of the Axis are in the negative (x and z ) and when you tilt it it goes over 2000 and scales down to vary between 20 to 100 again. This is why i would like to try to edit the registers to see if i can minimize that scale. I have watched you tube and have googled different web pages but there is no good example how to edit this register. I have tried the Wire. method but it does not work i am struggling to win. I will go though the README.textfile and see if i missed anything.


That sounds like normal noise to me. You can reduce noise by averaging several readings.