Skip to content

Commit 239d572

Browse files
Improved snippet
1 parent f9079e3 commit 239d572

File tree

1 file changed

+2
-4
lines changed
  • content/hardware/08.edu/solution-and-kits/alvik/tutorials/getting-started

1 file changed

+2
-4
lines changed

content/hardware/08.edu/solution-and-kits/alvik/tutorials/getting-started/getting-started.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,16 @@ Now that all the previous steps have been set, let's see how to make Alvik movin
5656
``` python
5757
from arduino_alvik import ArduinoAlvik
5858
from time import sleep_ms
59-
import sys
6059

6160
alvik = ArduinoAlvik()
6261
alvik.begin()
63-
sleep_ms(5000) # waiting for the robot to setup
64-
distance = 12
62+
distance = 15
6563
degrees = 45.00
6664
speed = 10.00
6765

6866
while (True):
6967

7068
distance_l, distance_cl, distance_c, distance_r, distance_cr = alvik.get_distance()
71-
sleep_ms(50)
7269
print(distance_c)
7370

7471
if distance_c < distance:
@@ -84,6 +81,7 @@ while (True):
8481
else:
8582
alvik.drive(speed, 0.0, linear_unit='cm/s')
8683

84+
sleep_ms(100)
8785
```
8886

8987
**4. **Connect Alvik to your PC using the cable included in the box, under the tray.

0 commit comments

Comments
 (0)