Advertisement
fraczek95

Untitled

Jun 9th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void motorMove(int steeps)
  2. {
  3.   digitalWrite(sleepPin,HIGH);
  4.   delayMicroseconds(5000);
  5.  
  6.   for(int x = 0; x < (int)(steeps); x++)
  7.   {
  8.     digitalWrite(stepPin,HIGH);
  9.     delayMicroseconds(3000);
  10.     digitalWrite(stepPin,LOW);
  11.     delayMicroseconds(3000);
  12.   }
  13.   delayMicroseconds(5000);
  14.   digitalWrite(sleepPin,LOW);
  15.   delayMicroseconds(5000);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement