Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,16 @@ Now that all the previous steps have been set, let's see how to make Alvik movin
``` python
from arduino_alvik import ArduinoAlvik
from time import sleep_ms
import sys

alvik = ArduinoAlvik()
alvik.begin()
sleep_ms(5000) # waiting for the robot to setup
distance = 12
distance = 15
degrees = 45.00
speed = 10.00

while (True):

distance_l, distance_cl, distance_c, distance_r, distance_cr = alvik.get_distance()
sleep_ms(50)
print(distance_c)

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

sleep_ms(100)
```

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