ragulin
Posts: 60
Joined: Tue Dec 22, 2015 6:52 pm

Step mottor control

Sun Jan 17, 2016 12:24 pm

Hey, Im trying to control my stepp motor. I use some code from this tutorial:
http://www.raspberrypi-spy.co.uk/2012/0 ... in-python/

When I run the code, I get this...and I dont know how to repair error in syntax in this language...:
https://www.dropbox.com/s/yzchkt562hnmi ... 2.png?dl=0

how should I fix it? Thanks

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Step mottor control

Sun Jan 17, 2016 12:43 pm

There should be a newline after the first "]".

DirkS
Posts: 10009
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Step mottor control

Sun Jan 17, 2016 2:57 pm

ragulin wrote:how should I fix it? Thanks
rurwin's solution should fix that error.

FYI: just below the code there is a command to download the complete script from bitbucket (starts with 'wget').
That version of the script seems to be correct.

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: Step mottor control

Mon Jan 18, 2016 8:06 pm

Should be fixed now on the blog post. There is a strange bug in the syntax highlighter I'm using where it refuses to place a line break between those two lines. I've put a comment at the end and that seems to fix it.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

Return to “Beginners”