surferdude89
New Member
I bought a full rotational servo motor for my project but it doesn't have any datasheet... =.=
so i run through the web and find some examples, can i use tis code? what further modification do i need? and can anyone explain the code used for servo motor? pls and thank you!
define osc 20
trisa.0=0 ''LEFT MOTOR''
trisa.1=0 ''RIGHT MOTOR''
LM var porta.0
RM var porta.1
Forward:
PULSOUT 0, 170 ‘ Left wheel anti-clockwise
PULSOUT 1, 130 ‘ Right wheel clockwise
PAUSE 20 ‘ Wait 20 ms
GOTO Forward ‘ Repeat
so i run through the web and find some examples, can i use tis code? what further modification do i need? and can anyone explain the code used for servo motor? pls and thank you!
define osc 20
trisa.0=0 ''LEFT MOTOR''
trisa.1=0 ''RIGHT MOTOR''
LM var porta.0
RM var porta.1
Forward:
PULSOUT 0, 170 ‘ Left wheel anti-clockwise
PULSOUT 1, 130 ‘ Right wheel clockwise
PAUSE 20 ‘ Wait 20 ms
GOTO Forward ‘ Repeat