Dm452t to arduino tto joystick

put breadboard away.
two wires of step- and dir- insert to two GND socket on the left on Leo.

GND of joystick insert to GND socket on the right on Leo, 5V of joystick insert to 5V socket on the left on Leo.

then try:

// Define pins for DM452T Driver
const int stepPin = 5;

void setup() {
  pinMode(stepPin, OUTPUT);
}

void loop() {
  digitalWrite(stepPin, !digitalRead(stepPin));
  delay(1);
}

be sure you not trying to use SW pin instead of analog out on joystick:

is this the whole code?

did you tried it?

i did nothing happened

well, something in your wiring is wrong

  1. power off, disconnect motor and check coils conductivity(hold two ends of coil together - rotor is very hard to rotate, same with other two wires, but not so hard if all 4 wires together), connect back to driver;
  2. check power of driver, motor rotor should be holded with some force when powered and loose if power off;
  3. connect step- to arduino GND, powers arduino, connect and disconnect step+ to 5V periodically (or little battery between step + and - )
1 Like