How to control Stepper Motor using a Joystick ( Easy Driver )

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • This video is aboutHow to control Stepper Motor using a Joystick ( Easy Driver ) , an Arduino and the Easy Driver
    Parts list
    - Arduino UNO R3
    - Easy Driver
    - Stepper Motor NEMA17
    - Joystick Module
    - PC Power supply
    - Breadboard
    - Jumper Wires
    Arduino Sketch : goo.gl/V1Pszy
    ::::::::::: SUPPORT CHANNEL ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    Please Donate To Help Me Afford New Equipment And Software To Make My Videos More : goo.gl/1m8Dg2
    Don't forget to subscribe!
    We Are One by Vexento / vexento
    / vexento
    Music promoted by Audio Library • We Are One - Vexento (...

Комментарии • 27

  • @NavasLucas
    @NavasLucas 3 года назад +6

    I transcribed the code
    . Here it is but I don't know what it says on line #1. it worked for me
    #
    #define stp 2
    #define dir 3
    #define MS1 4
    #define MS2 5
    #define EN 6
    //Declare variables for functions
    char user_input;
    int x;
    int y;
    int state;
    int joyX = A0;
    int joyVal;
    void setup() {
    pinMode(stp, OUTPUT);
    pinMode(dir, OUTPUT);
    pinMode(MS1, OUTPUT);
    pinMode(MS2, OUTPUT);
    pinMode(EN, OUTPUT);
    digitalWrite(stp, LOW);
    digitalWrite(dir, LOW);
    digitalWrite(MS1, LOW);
    digitalWrite(MS2, LOW);
    digitalWrite(EN, HIGH);
    Serial.begin(9600); //Open Serial connection for debbuging

    }
    //Main loop
    void loop() {

    while( (analogRead(joyX) == 0 ) || (analogRead(joyX) > 1000)){
    joyVal = analogRead(joyX);
    digitalWrite(EN, LOW);
    if( joyVal == 0){
    digitalWrite(dir, LOW);

    }
    else if(joyVal > 1000){
    digitalWrite(dir, HIGH);

    }
    digitalWrite(stp,HIGH); //Trigger one step forward
    delay(1);
    digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again
    delay(1);
    } // while loop
    digitalWrite(EN, HIGH);
    }

    • @ThesCrEe10
      @ThesCrEe10 2 года назад

      First line is #define Y_pin A0 or #define X_pin A0 depends on axis that you want to use with joyistick :)

  • @mikul2646
    @mikul2646 4 года назад +2

    Just play the video at 2x speed and it's watchable

  • @michaelmeneghetti5794
    @michaelmeneghetti5794 4 года назад +1

    Thank you for the tutorial. Great stuff.
    Redirected after clicking on "Arduino Sketch" and code appears to be inaccessible. Curious about modifying the run two or three steppers using two joysticks. Two could be run on a single joystick, and the other on a second joystick.

    • @leeman379
      @leeman379 3 года назад

      Yes I would also like to run 3 steppers with 2 joysticks any chance I could get some help with the code?

    • @knackofalltrades3912
      @knackofalltrades3912 2 года назад

      Yes! Have ou tried this yet? Been trying to find the code for this and I'm having ZEEERO luck.

  • @nadynamaky
    @nadynamaky 4 года назад +1

    Thanks for the video, what program do you use to draw the wiring schematics?

    • @Gollog99
      @Gollog99 3 года назад

      it´s called fritzing

  • @botzilla4508
    @botzilla4508 3 года назад

    Is it possible to store movement of joystick and run and re-run all day?

  • @user-sb2oc4mj5h
    @user-sb2oc4mj5h 8 месяцев назад

    como baixo o Arduino sketch?

  • @martijn4740
    @martijn4740 6 лет назад

    see mutch easier then the uln2003 great work

  • @bradberridge1135
    @bradberridge1135 3 года назад +2

    Thumbs down because Arduino sketch website leads to a sketchy, unrelated website.

  • @ericmentzer4953
    @ericmentzer4953 5 лет назад

    Is there any reason you chose those pins for the easy driver? I would like to use two motors controlled separatly by a joystick, is this possible? Thanks!

    • @ScienceFunInnovations
      @ScienceFunInnovations 4 года назад

      You would need 2 easydriver boards but only one joystick. Up/down could control one and right/ left the other. You could also wire ms1, ms2, and enable from both motors to the same pins on the arduino.

  • @Super79TA
    @Super79TA 6 лет назад

    May I ask what program you use to make the arduino diagram with? And very good video Thanks

  • @yogeshitaliya473
    @yogeshitaliya473 6 лет назад

    Nice one again

  • @ScienceFunInnovations
    @ScienceFunInnovations 4 года назад

    Thanks for the video. I'm hoping to make a camera slide like that as a future project...(so many projects, so little time)

    • @ScienceFunInnovations
      @ScienceFunInnovations 4 года назад

      @hillsbottom It's still on my to do list. I did get some parts, so hopefully soon...

  • @ErkanOkman
    @ErkanOkman 6 лет назад +2

    👍👏

  • @furkantokkan
    @furkantokkan 4 года назад

    code?

  • @Brief-Biography
    @Brief-Biography 2 года назад

    👍

  • @hamedahadi8389
    @hamedahadi8389 4 года назад

    hi
    send me your source code, please

  • @gksolutions2896
    @gksolutions2896 3 года назад

    😘