is there a way to control stepper motor and make it do 189 step?!
step = 1.9°
i want it to make full rotation
i can make it do a full rotation with 45° step
step = 1.9°
i want it to make full rotation
i can make it do a full rotation with 45° step
Rich (BB code):
int hstep[]={1,3,2,6,4,12,9,8,1};
int x,i;
void main()
{trisb=0;
portb=0;
trisd=1;
while(1)
{if(portd.b0==1)
{x++;
switch(x)
{case 1:
for(i=0;i<=190;i++)
{portb=hstep;
delay_ms(200);
}
break;
case 2:
for(i=190;i>=0;i--)
{portb=hstep;
delay_ms(200);
}
break;
}
}
}
}