mirror of
https://github.com/pybricks/pybricks-projects.git
synced 2026-09-15 02:52:41 +00:00
official_models/ev3/snap: fix imports, head reset
This commit is contained in:
committed by
laurensvalk
parent
9d96435675
commit
ab8b560ef4
@@ -2,9 +2,10 @@
|
||||
|
||||
from pybricks.hubs import EV3Brick
|
||||
from pybricks.ev3devices import Motor, UltrasonicSensor
|
||||
from pybricks.parameters import Port, Direction, SoundFile
|
||||
from pybricks.parameters import Port, Direction
|
||||
from pybricks.robotics import DriveBase
|
||||
from pybricks.tools import wait, StopWatch
|
||||
from pybricks.media.ev3dev import SoundFile
|
||||
from random import randint
|
||||
|
||||
# Initialize the EV3 brick.
|
||||
@@ -94,4 +95,4 @@ while True:
|
||||
ev3.speaker.play_file(SoundFile.SNAKE_HISS)
|
||||
|
||||
# Reset the head motor to its initial position.
|
||||
head_motor.run_time(1200, 1000)
|
||||
head_motor.run_target(1200, 0)
|
||||
|
||||
Reference in New Issue
Block a user