Shop OBEX P1 Docs P2 Docs Learn Events
lisy300 gyroscope module — Parallax Forums

lisy300 gyroscope module

Let's Go!Let's Go! Posts: 124
edited 2010-11-27 19:08 in BASIC Stamp
Can anyone point me in the direction of BS2 code examples for the gyroscope?

Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The smarter I get, the more I understand I don't know!

Comments

  • dandreaedandreae Posts: 1,375
    edited 2009-12-10 15:50
    Here is a test code for you to use (attached).

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support
  • Let's Go!Let's Go! Posts: 124
    edited 2009-12-10 15:53
    thanks a lot...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The smarter I get, the more I understand I don't know!
  • crazyarch93crazyarch93 Posts: 9
    edited 2010-11-27 17:59
    I am also trying to use the LISY300 with a Stamp 2 controller. I have a small digital camera attached to a servo and I'm trying to keep the camera level to the ground. I have two main questions:

    1. The gyro tells you the direction something is turning and how fast, I just need the tilt angle so I can feed this to a servo and adjust the camera position.

    2. Why do I need to worry about gyro drift? I don't really care about anything other than degrees from level. Does the gyro loose where level is when it drifts?

    Any code examples would be appreciated. I am really confused about how to read the gyro and send rotation commands to the servo so that the servo moves smoothly. Right now I am reading a dual axis accelorometer and passing that to a servo as a PWM signal in a DO LOOP.
  • FranklinFranklin Posts: 4,747
    edited 2010-11-27 19:08
    Gyros don't know or care where level is. As you say they know which way and how fast you are turning. An accelerometer can tell where "down" is but still don't know what "level" is in relation to the ground. You could use several ultrasonic or IR sensors to find parallel to the surrounding ground.
    It is also helpful if you start your own thread when posting a new question.
Sign In or Register to comment.