Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
847 Views

Controlling stepper motors using intel galileo

Hi Guys

i am struggling to run my stepper motors on the intel galileo as they work perfect on the arduino uno , so i am thinking maybe I am missing something fundamental and below is a simple code I use to test the bipolar stepper motor connected to a sparkfun easy driver then into the intel galileo board.

int Distance = 0; // Record the number of steps we've taken

void setup() {

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

digitalWrite(8, LOW);

digitalWrite(9, LOW);

}

void loop() {

digitalWrite(9, HIGH);

delayMicroseconds(100);

digitalWrite(9, LOW);

delayMicroseconds(100);

Distance = Distance + 1; // record this step

// Check to see if we are at the end of our move

if (Distance == 3600)

{

// We are! Reverse direction (invert DIR signal)

if (digitalRead(8) == LOW)

{

digitalWrite(8, HIGH);

}

else

{

digitalWrite(8, LOW);

}

// Reset our distance back to zero since we're

// starting a new move

Distance = 0;

// Now pause for half a second

delay(500);

}

}

Please advise on how to make it work on the intel galileo

Tags (1)
0 Kudos
1 Reply
Highlighted
Employee
4 Views

Re: Controlling stepper motors using intel galileo

Hi Mashilekhutso27

I don't have a stepper to test it, but by reviewed this other post /thread/49111 https://communities.intel.com/thread/49111 that is also from stepper motors, and looking at the answer marked as correct, I would say that maybe you can try using pin 2 and 3 with a fast output configuration take a look at this message /message/207904# 207904 https://communities.intel.com/message/207904# 207904.

Regards

 

JPMontero_Intel
0 Kudos