Created
April 5, 2021 19:31
-
-
Save lovettbarron/3ce6c6d8e9b9e9c8bb0b3980bece6b53 to your computer and use it in GitHub Desktop.
OT2 Hello World
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"0" | |
] | |
}, | |
"execution_count": 1, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"import os \n", | |
"os.system(\"systemctl start opentrons-robot-server\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import json\n", | |
"import time\n", | |
"from opentrons import protocol_api, types\n", | |
"import opentrons.execute\n", | |
"metadata = {'apiLevel': '2.9'}" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"Failed to initialize character device, will not be able to control gpios (lights, button, smoothiekill, smoothie reset). Only one connection can be made to the gpios at a time. If you need to control gpios, first stop the robot server with systemctl stop opentrons-robot-server. Until you restart the server with systemctl start opentrons-robot-server, you will be unable to control the robot using the Opentrons app.\n" | |
] | |
} | |
], | |
"source": [ | |
"# Prot\n", | |
"protocol = opentrons.execute.get_protocol_api('2.9')\n", | |
"\n", | |
"# Plat\n", | |
"well = protocol.load_labware('nest_12_reservoir_15ml', 7)\n", | |
"tiprack_1 = protocol.load_labware('opentrons_96_tiprack_300ul', 10)\n", | |
"\n", | |
"# Pip\n", | |
"p300 = protocol.load_instrument('p300_single', 'left', tip_racks=[tiprack_1])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def blinkblink():\n", | |
" protocol.set_rail_lights(False)\n", | |
" protocol.delay(seconds = .3)\n", | |
" protocol.set_rail_lights(True)\n", | |
" protocol.delay(seconds = .3)\n", | |
" protocol.set_rail_lights(False)\n", | |
" protocol.delay(seconds = .3)\n", | |
" protocol.set_rail_lights(True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def startup():\n", | |
" protocol.set_rail_lights(True)\n", | |
" protocol.home()\n", | |
" \n", | |
" \n", | |
"def shutdown():\n", | |
" protocol.home()\n", | |
" protocol.set_rail_lights(False)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"startup()\n", | |
"\n", | |
"p300.pick_up_tip()\n", | |
"blinkblink()\n", | |
"p300.return_tip()\n", | |
"\n", | |
"shutdown()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.1" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment