Skip to content
Snippets Groups Projects
Commit 53fa1fec authored by Felix Agner's avatar Felix Agner
Browse files

completed the dummybot example

parent 01b478e3
No related branches found
No related tags found
No related merge requests found
...@@ -16,11 +16,23 @@ def run_dummybot(HOST,verbose=True): ...@@ -16,11 +16,23 @@ def run_dummybot(HOST,verbose=True):
with OmniBot(HOST,verbose=verbose) as bot: with OmniBot(HOST,verbose=verbose) as bot:
print("Connected") print("Connected")
while time() < tstart + 5: # Target speed for servos
vset = 100
# Go one way
while time() < tstart + 3:
t0 = time() t0 = time()
bot.set_speed([]) bot.set_speeds([vset,vset,vset])
print('x:'+bot.get_x())
print('y:'+bot.get_y())
# Go the other way
while time() < tstart + 6:
t0 = time()
bot.set_speeds([-vset,-vset,-vset])
print('x:'+bot.get_x()) print('x:'+bot.get_x())
print('y:'+bot.get_y()) print('y:'+bot.get_y())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment