"connections": { "edison": { "adaptor": "zorg_edison.Edison" } }, "devices": { "lock": { "driver": "zorg_gpio.Servo", "connection": "edison", "pin": 5 }, "led": { "driver": "zorg_gpio.Led", "connection": "edison", "pin": 4 }, "mic": { "driver": "zorg_gpio.AnalogSensor", "connection": "edison", "pin": 1 } }, "name": "Smith", "work": work }) api = zorg.api("zorg.api.Http", {}) #robot.start() api.start()
"url": "http://192.168.1.6/image.jpg" }, "chatterbot": { "adaptor": "communication.Conversation" } #"raspberry_pi": { # "adaptor": "zorg-raspi.RasPi", #}, }, "devices": { "camera_one": { "connection": "camera", "driver": "zorg_network_camera.Feed" }, "camera_ocr": { "connection": "camera", "driver": "zorg_network_camera.OCR" }, "communication": { "connection": "chatterbot", "driver": "communication.ApiDriver" }, }, "work": work, }) api = zorg.api("zorg.api.Http", {}) robot.start() api.start()
def main(): robot = zorg.robot({ "name": "Salvius", "connections": { "camera": { "adaptor": "zorg_network_camera.Camera", "url": "http://192.168.1.6/image.jpg" }, "chatterbot": { "adaptor": "salvius.communication.Conversation", "io_adapter": "chatterbot.adapters.io.JsonAdapter" }, "serial": { "adaptor": "zorg_emic.Serial", "port": "/dev/ttyAMA0", }, "sphinx": { "adaptor": "salvius.speech.SpeechRecognition", "recognizer_function": "recognize_sphinx" }, "analytics": { "adaptor": "iot_analytics.apps.zorg.GoogleAnalytics", "property_id": "UA-12573345-12", "client_id": "salvius", }, }, "devices": { "camera_one": { "connection": "camera", "driver": "zorg_network_camera.Feed" }, "camera_ocr": { "connection": "camera", "driver": "zorg_network_camera.OCR" }, "communication": { "connection": "chatterbot", "driver": "salvius.communication.ApiDriver" }, "speech_synthesis": { "connection": "serial", "driver": "zorg_emic.Emic2", }, "speech_synthesis2": { "connection": "chatterbot", "driver": "salvius.speech.SpeechSynthesis", }, "speech_recognition": { "connection": "sphinx", "driver": "salvius.speech.ApiDriver", }, "touch_sensor": { "connection": "analytics", "driver": "iot_analytics.apps.zorg.drivers.Event", } }, "work": work, }) api = zorg.api("zorg.api.Http", {}) try: robot.start() api.start() except (KeyboardInterrupt, EOFError, SystemExit): pass