hello all,
doing project want use raspberry pi communicate motor controller using usb connection. motor controller has functionality, having trouble getting work. posting here , on manufacturers website in hopes find issue. below code trying send via usb motor controller. asking motor controllers device id , expecting reply after send it. if there errors in code or how going this, appreciate can provide.
doing project want use raspberry pi communicate motor controller using usb connection. motor controller has functionality, having trouble getting work. posting here , on manufacturers website in hopes find issue. below code trying send via usb motor controller. asking motor controllers device id , expecting reply after send it. if there errors in code or how going this, appreciate can provide.
code: select all
import serial import time ser = serial.serial('/dev/ttyacm0', 115200, bytesize = serial.eightbits, parity = serial.parity_none, stopbits=serial.stopbits_one, wiritetimeout = 0, rtscts = false, dsrdtr=false,xonxoff=false, timeout = 10) time.sleep(2) command = '?fid' ser.write(bytes(command.encode('ascii'))) s= ser.readline print str(s)
/dev/ttyacm0 uart on gpio pins (pre-pi3). device else. plug in running pi , type dmesg in terminal see if pi can identify , assign device driver it; should see /dev/ttyusb0 (or @ least device added).
raspberrypi
Comments
Post a Comment