Search found 4 matches

by El_person
Thu Aug 12, 2021 12:24 pm
Forum: Drivers for External Components
Topic: stepper motor module
Replies: 0
Views: 3347

stepper motor module

hello everyone , am currently working on a stepper motor l298n control module however for some reason it is not working , the tables i copied from the sequence had A B A' B' #p16 orange A' #p17 brown A #p18 red B #p19 yellow B' , and that is the sequence i used as an input , i also tried changing th...
by El_person
Fri Aug 06, 2021 6:54 pm
Forum: General Discussion and Questions
Topic: global variables
Replies: 6
Views: 17533

Re: global variables

that is my main code without any modifications , it was exactly like ure suggestion but for some reason it still have an error in line 6 File "<stdin>", line 6 SyntaxError: invalid syntax from machine import pin delay=50 # define code initial values (pin1,oin2,pin3,pin4,delay) def set_stepper(v,y,x,...
by El_person
Fri Aug 06, 2021 2:55 pm
Forum: General Discussion and Questions
Topic: global variables
Replies: 6
Views: 17533

Re: global variables

The global statement had to be inside the function using the global symbols. That way you declare, that these are not local. i have tried adding global to both sequence and step functions however the same error still apears line 7, in set_stepper SyntaxError: identifier redefined as global def set_...
by El_person
Fri Aug 06, 2021 2:38 pm
Forum: General Discussion and Questions
Topic: global variables
Replies: 6
Views: 17533

global variables

so , i have made this code for my stepper motor control however it is giving me an error that i don't understand from machine import pin delay=50 # define code initial values (pin1,oin2,pin3,pin4,delay) def set_stepper(v,y,x,z,delay) : global delay a=Pin(str(v), mode = Pin.OUT) b=Pin(str(x), mode = ...