Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle as tu
- a = open('./ev3-arm/ev3_arm_output','r').read()
- a=a.split('\n')
- tu.showturtle()
- tu.speed(1)
- x,y=-300,0
- tu.penup()
- tu.goto(x,y)
- for i in a[:-1]:
- if 'pen_up' in i:
- tu.penup()
- elif 'pen_down' in i:
- tu.pendown()
- else:
- if i[0]=='A':
- y+=float(i.split('|')[1])*float(i.split('|')[2])/(75*10)
- else:
- x+=float(i.split('|')[1])*float(i.split('|')[2])/(15)
- tu.goto(x,y)
- tu.done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement