feed_count = None # These attributes are used by properties. count_changed_timer = StopWatch () # These attributes are initialized later in the reset() method. It is used to detect when someone pets # the puppy. It is used to detect the colors when # feeding the puppy. COUNTERCLOCKWISE, gears =, ]) # Initialize the Color Sensor. The 12-tooth gears interface with 36-tooth gears. The 24-tooth gear is connected to parallel 12-tooth gears via # an axle. COUNTERCLOCKWISE ) # Initialize the motor connected to the head. ev3 = EV3Brick () # Initialize the motors connected to the back legs. TEAR ) # the tear is erased later def _init_ ( self ): # Initialize the EV3 brick. SLEEPING ) HURT_EYES = Image ( ImageFile. TIRED_RIGHT ) SLEEPING_EYES = Image ( ImageFile. TIRED_LEFT ) TIRED_RIGHT_EYES = Image ( ImageFile. TIRED_MIDDLE ) TIRED_LEFT_EYES = Image ( ImageFile. NEUTRAL ) TIRED_EYES = Image ( ImageFile. HEAD_UP_ANGLE = 0 HEAD_DOWN_ANGLE = - 40 # These constants are for the eyes. HALF_UP_ANGLE = 25 STAND_UP_ANGLE = 65 STRETCH_ANGLE = 125 # These constants are for positioning the head. Download: Building instructions can be found at: """ import urandom from pybricks.hubs import EV3Brick from pybricks.ev3devices import Motor, ColorSensor, TouchSensor from pybricks.parameters import Port, Button, Color, Direction from 3dev import Image, ImageFile, SoundFile from pybricks.tools import wait, StopWatch class Puppy : # These constants are used for positioning the legs. #!/usr/bin/env pybricks-micropython """ Example LEGO® MINDSTORMS® EV3 Puppy Program - This program requires LEGO® EV3 MicroPython v2.0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |