Your Turn: Full Circles

Did You Know - Turning Radius

With the servos mounted on the inside of the chassis, the distance between the cyber:bot robot’s wheels is about 107.6 mm. To make the cyber:bot pivot (not rotate!) in a full circle, we can think about that 107.6 mm as the radius of a circle, the turning radius

How much distance would the outer wheel have to travel to do a full circle?  That would be:

c = 2 x π x r

...with a result of about 676 mm.  The turning radius in ticks is just that number of mm divided by 3.25 mm, for 208 ticks.  Also, it doesn’t matter whether it’s a pivot turn with drive.goto(0, 208) or a rotating turn with drive.goto(104, 104), the cyber:bot will still turn 360°.

 

 

Your Turn: Inches to Ticks

Here is a function to convert inches of distance to ticks:

def in_to_ticks(inches):
    return int(inches * 25.4 / 3.25)
  • Write and test a script that starts with an inch distance and calculates the number of ticks needed to travel that distance.  Test it with your cyber:bot.