L3g4200d
ratronic
Posts: 1,451
Since a couple of people have asked about this gyro I thought I'd post a modified version of the example given on the product page. This version will show the angular rate output and the integrated readings of the rate output (~attitude) of all axis. The only modifications I made were to add a 1 second delay to the beggining of the Calibrate method to ensure the gyro is still when powered up. I also added a 10ms delay to the main loop to mainly improve display speed and as a bonus better match to the update rate of the gyro. Remember this program shows a close approximation of the real rate output. This is also in the OBEX under sensors since I didn't see one there.
Comments
I Need Help For Gyroscope Module L3G4200D With Arduino Uno
it is working now in Serial Monitor , but how i can read the X Y Z degree to control The Servo in my project , i searched over the net & no guide.
so please help me
Thanks
approximate current position from the starting point in the rotation about that axis. Here is some psuedo code of what I did to Parallax's program above.
Also the vga led indicators act as a bar graph starting at about the middle led for the starting positition and then moving to the next led for approximately every degree of movement from the module in the Z axis. (+4/-3 approximate degrees from 0 on leds)
At the same time the servo will start out at the middle position and move along with the module in the Z axis. The serial display has been modified to show approximate +/- degrees from the starting point and the rate output of each axis.
This is just a simple demo, everything is very approximate and I wouldn't use this to guide a rocket ship!
Your code works a treat! It is fairly simple, and was easy to implement on a Proto board.
And very entertaining too... It's a crowd pleaser. :thumb::thumb:
-Tommy
Super thanks! I'm just now figuring out how to play with the gyroscope module and this example worked perfectly!
You may find a number other than 38 that is more accurate for each axis.