Python connection wiht uArm SwiftPro - Problem

uArm Serial No.: (the No. at the bottom of each uArm reading “UARM-UP13000180406A2”)

Firmware Version: 3.20

Operation System: Win7

uArm Controlling Method: Arduino/Python 3.0 (Please specify the software/library version)

Hi there,
I recently bought a uArm Swift Pro and i trying to control it via Python.
I have read all the available material on github, but i am new in programming and i am having a problem in connecting to Arduino via python.

After inserting the following commands, i get an return error after the “syspath” line:
NameError: name ‘file’ is not defined.
After this error i get another error message:
ModuleNotFoundError: No module named ‘uarm.wrapper’.

PS.: I have already installed the pyserial library.

So, what should i do to solve this??

#!/usr/bin/env python3

Software License Agreement (BSD License)

Copyright (c) 2018, UFactory, Inc.

All rights reserved.

Author: Vinman vinman.wen@ufactory.cc vinman.cub@gmail.com

import os
import sys
import time
sys.path.append(os.path.join(os.path.dirname(file), ‘…/…/…’))
from uarm.wrapper import SwiftAPI

Could you post your code here?

Hi Daniel,

I dont have the code actually. What i am trying to do is to connect the uarm with pyhton using some examples that i found on github. But i am not being successful. Do you have any recommendations to da that?

I used to programming in Python but i never worked with API or arduino.

The examples that i was using is found on this link.

Best regards,

Gabriel

Hi, if you want to use the demo of Python SDK you have to install the SDK first.

could you guide me how to do it?

1 Like

It’s the same way you using the other lib, if you use the IDE like pycharm, just open the folder of uArm python SDK.