
from pymata_aio.pymata3 import PyMata3
from RedBot import RedBotMotors
# This line "includes" the RedBot library into your sketch.
# Provides special objects, methods, and functions for the RedBot.

board = PyMata3()

motors = RedBotMotors(board)
# Instantiate the motor control object. This only needs to be done once.


def setup():
    motors.drive(255)   # Turn on Left and right motors at full speed forward.
    board.sleep(2.0)    # Waits for 2 seconds
    motors.stop()       # Stops both motors


def loop():
    # Nothing here. We'll get to this in the next experiment.
    pass


if __name__ == "__main__":
    setup()
    while True:
        loop()


from pymata_aio.pymata3 import PyMata3
from RedBot import RedBotMotors
# This line "includes" the RedBot library into your sketch.
# Provides special objects, methods, and functions for the RedBot.

board = PyMata3()

motors = RedBotMotors(board)
# Instantiate the motor control object. This only needs to be done once.


def setup():
    print("Left and right motors at full speed forward")
    motors.drive(255)   # Turn on Left and right motors at full speed forward.
    board.sleep(2.0)    # Waits for 2 seconds
    print("Stop both motors")
    motors.stop()       # Stops both motors


def loop():
    # Nothing here. We'll get to this in the next experiment.
    pass


if __name__ == "__main__":
    setup()
    while True:
        loop()

Add a log to Exp2
Add a log to Exp2

  
  from pymata_aio.pymata3 import PyMata3
  from RedBot import RedBotMotors
  # This line "includes" the RedBot library into your sketch.
  # Provides special objects, methods, and functions for the RedBot.
  
  board = PyMata3()
  
  motors = RedBotMotors(board)
  # Instantiate the motor control object. This only needs to be done once.
  
  
  def setup():
+     print("Left and right motors at full speed forward")
      motors.drive(255)   # Turn on Left and right motors at full speed forward.
      board.sleep(2.0)    # Waits for 2 seconds
+     print("Stop both motors")
      motors.stop()       # Stops both motors
  
  
  def loop():
      # Nothing here. We'll get to this in the next experiment.
      pass
  
  
  if __name__ == "__main__":
      setup()
      while True:
          loop()
  
Add a log to Exp2
## Code Before:

from pymata_aio.pymata3 import PyMata3
from RedBot import RedBotMotors
# This line "includes" the RedBot library into your sketch.
# Provides special objects, methods, and functions for the RedBot.

board = PyMata3()

motors = RedBotMotors(board)
# Instantiate the motor control object. This only needs to be done once.


def setup():
    motors.drive(255)   # Turn on Left and right motors at full speed forward.
    board.sleep(2.0)    # Waits for 2 seconds
    motors.stop()       # Stops both motors


def loop():
    # Nothing here. We'll get to this in the next experiment.
    pass


if __name__ == "__main__":
    setup()
    while True:
        loop()

## Instruction:
Add a log to Exp2
## Code After:

from pymata_aio.pymata3 import PyMata3
from RedBot import RedBotMotors
# This line "includes" the RedBot library into your sketch.
# Provides special objects, methods, and functions for the RedBot.

board = PyMata3()

motors = RedBotMotors(board)
# Instantiate the motor control object. This only needs to be done once.


def setup():
    print("Left and right motors at full speed forward")
    motors.drive(255)   # Turn on Left and right motors at full speed forward.
    board.sleep(2.0)    # Waits for 2 seconds
    print("Stop both motors")
    motors.stop()       # Stops both motors


def loop():
    # Nothing here. We'll get to this in the next experiment.
    pass


if __name__ == "__main__":
    setup()
    while True:
        loop()
