def setup(self, port):
port = str(port)<EOL>self._serial = serial.Serial(port, <NUM_LIT>, timeout=<NUM_LIT:2>)<EOL>time.sleep(<NUM_LIT:2>)  <EOL>if not self._serial.is_open:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>self._serial.write(b'<STR_LIT>')<EOL>if self._serial.read() != b'<STR_LIT>':<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>ps = [p for p in self.available_pins() if p['<STR_LIT>']['<STR_LIT>']]<EOL>for pin in ps:<EOL><INDENT>self._set_pin_direction(pin['<STR_LIT:id>'], ahio.Direction.Output)<EOL><DEDENT>
Connects to an Arduino UNO on serial port `port`.

        @throw RuntimeError can't connect to Arduino