Added: 1 year ago
From: 16mbuckley
Views: 729
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (5)

Sign In or Sign Up now to post a comment!
  • great work!...did you use the gyro/accelerometer setup to turn or just balance? im trying to set up a gyro/accelerometer combo to find degree orientation as I turn

  • @deadhaven I used it to balance. I have another version of the bot that uses the gyro for the rotation. I take readings at a fixed interval and sum them and then convert to degrees. Here is the puedo code:

    gyro_sum = 0

    for each time tick (10ms)

    gyro = read_gyro - gyro_bias (bias is the value when not moving)

    gyro_sum = gyro_sum + (gyro * 0.01)

    angle = gyro+sum / 2.5 (gyro spec: 2.5mV @ 400 deg/sec or 10.0 mV @ 100 deg/sec, I used 2.5mV)

    repeat while angle < desired angle

    Hope this helps Mike

  • very very nice!

  • Hey Mike, nice work!

    What is the next step?

  • @JeromeDemers

    Thanks. Making it backup. The couple of things I have tried failed. Switching to reverse is to abrupt and causes it to oscillate. I'll eventually figure it out, that's the fun!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more