Skip to content

Commit 11a2cc2

Browse files
Snippet improvement
1 parent 1b63556 commit 11a2cc2

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
@@ -94,19 +94,16 @@ Now that all the previous steps have been set, let's see how to make Alvik movin
9494
``` python
9595
from arduino_alvik import ArduinoAlvik
9696
from time import sleep_ms
97-
import sys
9897

9998
alvik = ArduinoAlvik()
10099
alvik.begin()
101-
sleep_ms(5000) # waiting for the robot to setup
102-
distance = 12
100+
distance = 15
103101
degrees = 45.00
104102
speed = 10.00
105103

106104
while (True):
107105

108106
distance_l, distance_cl, distance_c, distance_r, distance_cr = alvik.get_distance()
109-
sleep_ms(50)
110107
print(distance_c)
111108

112109
if distance_c < distance:
@@ -122,6 +119,7 @@ while (True):
122119
else:
123120
alvik.drive(speed, 0.0, linear_unit='cm/s')
124121

122+
sleep_ms(100)
125123
```
126124

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

0 commit comments

Comments
 (0)