Zumi goes off after commands



  • So im working on a study project with my Zumi.
    First I need to create a own line Follower.

    I tried to get used to the IR-Sensors in small steps
    but this code doesnt work.

    from zumi.zumi import Zumi
    from zumi.util.screen import Screen
    import time

    zumi = Zumi()
    screen = Screen()

    zumi.reset_drive()
    for i in range(0, 100):
    zumi.forward_step(20,0)
    ir_readings = zumi.get_all_IR_data()
    screen.draw_text(str(ir_readings[3]))

    zumi.stop()

    If i run the code zumi is driving for a bit then making quick turns in the same spot left and right and
    shuts off comletly.


  • administrators

    @timmytomate We recommend not using the screen draw functions in your for loop in conjunction with the forward_step(). Any of the screen drawing functions take around 300 ms, which will delay the forward step. Let us know if this helps!


Log in to reply
 

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.