Hi guys,
I am facing one weird problem, here is the situation. While controlling stepper motor via stepper motor driver from my arduino board, after board receives serial command for controlling motor it starts moving motor but suddenly it resets the board and all thing stops.
Previously I use to control the stepper motor from Arduino duemilanove, and it use to work. But after changing the code to work with arduino2560 this problem is appearing. After few tries and few resets now even i am not able to recognize the board with laptop.
Technical Information
Board = Arduino 2560 ADK
Communication = serial over usb
Computer = Windows7, laptop
stepper motor = MIMY 35 KG
driver = leadshine driver m542
Code snippet
#define STEPS 200
#define PULSE_PIN 23
#define DIRECTION_PIN 25
//stepper moving code
while(digitalRead(ZeroSensorPin)==0)
{
LeadShinestepper.step(1);
}
LeadShinestepper.step(-1600);
Any help would be of great help.
Regards