Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97904

my first script for the GoPiGo

From input/ldompeling@casema.nl
Newsgroups comp.lang.python
Subject my first script for the GoPiGo
Message-ID <gZ6Wx.71971$pj3.34536@fx05.am1> (permalink)
Organization Pure Usenet - Usenet for everyone
Date 2015-10-22 15:07 +0000

Show all headers | View raw


I want that this script runs to times from the upper line to the buttom line.
I tried with for x in range(2): but that didn't work
The GoPiGo is a small robot on wheels.

The API codes are here: 
http://www.dexterindustries.com/GoPiGo/programming/python-programming-for-the-
raspberry-pi-gopigo/


from gopigo import *
import time

for x in range (2):
mindist = 70
servo(120)
time.sleep(2)
fwd()
stop()
time.sleep(2)
bwd()
stop()
if mindist > us_dist(15):
    bwd()
    stop
    print x


-- 
--------------------------------- --- -- -
Posted with NewsLeecher v7.0 Beta 2
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

my first script for the GoPiGo input/ldompeling@casema.nl - 2015-10-22 15:07 +0000
  Re: my first script for the GoPiGo MRAB <python@mrabarnett.plus.com> - 2015-10-22 16:25 +0100
    Re: my first script for the GoPiGo input/ldompeling@casema.nl - 2015-10-22 15:45 +0000
      Re: my first script for the GoPiGo MRAB <python@mrabarnett.plus.com> - 2015-10-22 17:40 +0100

csiph-web