My aim is to learn to code an opentrons machine using python, because there are several libraries available that gives me more flexibility and manually figuring out settings for the opentrons machine.

from pylabrobot.liquid_handling import LiquidHandler
from pylabrobot.liquid_handling.backends.opentrons_backend import OpentronsBackend
from pylabrobot.resources import OTDeck

ot = OpentronsBackend(host="0.0.0.0", port=5001) #Change and ask TA

lh = LiquidHandler(backend=ot, deck=OTDeck())

from pylabrobot.liquid_handling.standard import (
  Pickup,
  PickupTipRack,
  Drop,
  DropTipRack,
  Aspiration,
  AspirationPlate,
  Dispense,
  DispensePlate,
  Move,
)

lh.setup()
from pylabrobot.resources.opentrons import opentrons_96_tiprack_20ul, opentrons_96_tiprack_300ul,nest_96_wellplate_200ul_flat
from pylabrobot.resources.opentrons.plates import corning_6_wellplate_16point8ml_flat # from <https://docs.pylabrobot.org/_autosummary/pylabrobot.resources.opentrons.plates.corning_6_wellplate_16point8ml_flat.html#pylabrobot.resources.opentrons.plates.corning_6_wellplate_16point8ml_flat>

tips1 = opentrons_96_tiprack_20ul(name='tiprack_20ul')
lh.deck.assign_child_at_slot(tips1, slot=1)

tips2 = opentrons_96_tiprack_300ul (name='tiprack_300ul')
lh.deck.assign_child_at_slot(tips2, slot=4)

plate = corning_6_wellplate_16point8ml_flat(name='color')

lh.deck.assign_child_at_slot(plate, slot=5)

wellplate1 = nest_96_wellplate_200ul_flat(name='well_plate_200ul')
lh.deck.assign_child_at_slot(wellplate1, slot=8)

lh.summary()

Untitled

Untitled

Untitled

#Centre chassis #grey                         #green << final color
a = [3,4,9,10]
b = ['E','D']

#Wings side   #black                          #blue << final color
a1 = [1,12]
b1 = ['A','B','C','D','E','F','G','H']

#Pilot cabin    #black                         #grey << final color
a3 = [6,7]
b3 = ['E','D']

#Inner Winglet    #pink                         #blue << final color
a4 = [2,11] 
b4 = ['C','F','E','D']

#cabinwall sides   #grey                         #Red << final color
a5 = [5,8]
b5 = ['E','D']

#cabin wall     #yellow                          #Red << final color
a6 = [6,7]
b6 = ['C','F']

x = [a1,a,a3,a4,a5,a6]
y = [b1,b,b3,b4,b5,b6]
color_scheme=['black', 'grey','black','pink','grey', 'yellow'] # I changed the colors to test my code

Untitled

def sortinstructions(x,y,color_scheme):
    source = []
    dests =[]

    for i in range(len(x)):
        destination  = []    
        for num in sorted(x[i]):
            for letter in sorted(y[i]):
                destination.append(letter + str(num))
        
        for t in range(len(destination)):
            source.append(color_scheme[i])
            dests.append(destination[t])

    return dests, source