Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15971

Controlling a stepper motor with python

$
0
0

I am attempting to control a stepper motor with python. The commands I am attempting to send are:
MN
LD3
MR1000
5
V10
D30000
G
Here is the code I have:

import serial
ser = serial.Serial('COM6',9600)
cmd = 'MN\n' + 'LD3\n' + 'MR1000\n' + 'A5\n' + 'V10\n' + 'D30000\n' + 'G\r\n'
ser.write(cmd.encode())

Can someone tell me what I am doing wrong?

7 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 15971

Latest Images

Trending Articles



Latest Images