Skip to content

Instantly share code, notes, and snippets.

@erica
Created December 12, 2016 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erica/7d673c009b453eafec2c4a9525e72a71 to your computer and use it in GitHub Desktop.
Save erica/7d673c009b453eafec2c4a9525e72a71 to your computer and use it in GitHub Desktop.
import sys
import cozmo
'''
Hello Human
Make Cozmo say 'Hello Human' in this simple
Cozmo SDK example program.
'''
def run(sdk_conn):
robot = sdk_conn.wait_for_robot()
robot.say_text("Hello Human").wait_for_completed()
print("Success")
if __name__ == '__main__':
cozmo.setup_basic_logging()
cozmo.connect(run)
try:
cozmo.connect(run)
except cozmo.ConnectionError as err:
sys.exit("Connection error 😬: %s" % err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment