Hi. I need some question about stepper motor libary.
how can i use mpc.pin 3-6 in this code.
Stepper(steps,pin1,pin2,pin3,pin4);
I not good in english.
thank you very much for help
Hi. I need some question about stepper motor libary.
how can i use mpc.pin 3-6 in this code.
Stepper(steps,pin1,pin2,pin3,pin4);
I not good in english.
thank you very much for help
Please post a link to the datasheet for the mcp23017.
If it is a stepper driver that takes step and direction signals from the Arduino you should use the AccelStepper library.
Also, post a link to the datasheet for your stepper motor.
this is MCP23017 Datasheet
And i use 28BYJ-48 AND Drive uln2003
i connect A4, A5 pin of Arduino uno R3 with mcp23017. And connect mcp.pin(3.4.5.6) to uln2003 to drive stepper motor.
in this code. how can i set mpc.pin 3, 4 ,5 ,6 like this
#include <AccelStepper.h>//=============================
#define HALFSTEP 8
// motor pins
#define motorPin1 3 // IN1 on the ULN2003 driver 1
#define motorPin2 4 // IN2 on the ULN2003 driver 1
#define motorPin3 5 // IN3 on the ULN2003 driver 1
#define motorPin4 6 // IN4 on the ULN2003 driver 1
//==============================================
i want to coding like this.
AccelStepper stepper1(HALFSTEP, mcp.pin(3), mcp.pin(4), mcp.pin(5), mcp.pin(6));
but it error.
thank for help.
What error? Post all the code and the full error please.
You need to use AccelStepper::HALF4WIRE, not define your own HALFSTEP
Thank you very much. I chang to use arduino mega 2560 alrady. It ok with digital pin