Control a Stepper Motor using an Arduino, a Joystick - Tutorial

Sdílet
Vložit
  • čas přidán 25. 08. 2024
  • Hi Guys in this video shows how to control stepper motor speed and direction of rotation using Arduino UNO board and PS2 joystick. The stepper motor used in this example is 28BYJ-48 (unipolar stepper motor) which usually comes with its driver board.
    Thus there is no need of any easy step driver. We are just using ULN2003 Darlington pair motor driver IC.
    Follow Me on my Social Media
    Instagram:
    / waqas_farooq124
    Twitter
    / waqasfarooq01
    Facebook page: / waqasandusama

Komentáře • 160

  • @WaqasFarooq
    @WaqasFarooq  Před 4 lety +22

    // include Arduino stepper motor library
    #include

    // define number of steps per revolution
    #define STEPS 32

    // define stepper motor control pins
    #define IN1 11
    #define IN2 10
    #define IN3 9
    #define IN4 8

    // initialize stepper library
    Stepper stepper(STEPS, IN4, IN2, IN3, IN1);

    // joystick pot output is connected to Arduino A0
    #define joystick A0

    void setup()
    {

    }

    void loop()
    {
    // read analog value from the potentiometer
    int val = analogRead(joystick);

    // if the joystic is in the middle ===> stop the motor
    if( (val > 500) && (val < 523) )
    {
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
    }

    else
    {
    // move the motor in the first direction
    while (val >= 523)
    {
    // map the speed between 5 and 500 rpm
    int speed_ = map(val, 523, 1023, 5, 500);
    // set motor speed
    stepper.setSpeed(speed_);

    // move the motor (1 step)
    stepper.step(1);

    val = analogRead(joystick);
    }

    // move the motor in the other direction
    while (val

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      @Jae Leidall I am glad it worked for you

    • @kassemjebbari2242
      @kassemjebbari2242 Před 3 lety

      @@WaqasFarooq oke mercii beaucoup sa fonctionne

    • @kassemjebbari2242
      @kassemjebbari2242 Před 3 lety

      I have a question if I wanted to create a 2 speed stepper motor what could I change?

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      @@kassemjebbari2242 you need to copy same lines of instructions for 2nd motor but with different Pin and alsoy axis oin of joystick to control that motor

    • @kassemjebbari2242
      @kassemjebbari2242 Před 3 lety

      @@WaqasFarooq oke oke thank you I just finished my program I send it to you.
      would you tell me if it is good?

  • @michelromero7671
    @michelromero7671 Před 4 lety +3

    Nice tutorial! I found it useful but I think some beginners wouldn't find it so, the verbal explanation is a must in this sort of tutorials where code from specialized libraries is used.

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety +1

      Glad it was helpful!.
      I agree with you. In the future i will add my voice over as well so everyone can understand

  • @ericvigneron1610
    @ericvigneron1610 Před 3 lety +3

    I love it !!! no blabla, very clear vid.

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      I am glad that you loved this video and thank you for watching and subscribing my channel

  • @juantap5740
    @juantap5740 Před 4 lety +4

    I like how he include the debugging

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      i am glad you liked it ,consider subscribing my channel

  • @wolontong
    @wolontong Před 3 lety +3

    what is this software that you are using?

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety +1

      I am using Fritzing for make this schematic here the link fritzing.org/
      Thank you for commenting and subscribing

  • @ericvigneron1610
    @ericvigneron1610 Před 3 lety +1

    Very good work. It works good. Program is not really academic, but it works good. Little problem: when I move the joystick, and release it, the stepper is still turning slowly, and of course, the LEDs on the stepper card are blinking. If I disconnect the arduino and reconnect it, the stepper stands still and stays like that if I do not touch je joystick. As soon as I touch the joystick, it works, if I releasing the joystick, I have the same result, the stepper is moving slowly.
    If you have a little time to see that...... Anyway, thank you for releasing your program.

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      there is little delay in code you can reduce the code delay

    • @DSmediaFotoFilm
      @DSmediaFotoFilm Před 3 lety +1

      @@WaqasFarooq i have the same problem. what do i have to do to stop the engine and stop turning

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety +1

      @@DSmediaFotoFilm no when you will release the joystick it will automatically stop

    • @DSmediaFotoFilm
      @DSmediaFotoFilm Před 3 lety +1

      @@WaqasFarooq Can you limit the number of steps?
      I want to do a follow focus for my DSLR camera

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      @@DSmediaFotoFilm yes it is possible if you want smooth movement and for you camera slider its better to use NEMA 17 Stepper motor

  • @bricolages6239
    @bricolages6239 Před 3 lety +1

    Merci tuto clair et nickel.

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      i am glad you liked it and thank you for subscribing my channel

  • @christianduranvela
    @christianduranvela Před 3 lety +1

    reales gracias tu aporte es un gran trabajo

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      Thank You , I am glad you like and thank you for subscribing

  • @musaaftabi6269
    @musaaftabi6269 Před rokem

    Its exactly what i need . i have a question. How to increase or decrease the stepper motor speed ?

    • @WaqasFarooq
      @WaqasFarooq  Před rokem

      basically joystick has variables inside it speed depends on how much further you push the joystick up or down

  • @trevorwilson5457
    @trevorwilson5457 Před 3 lety +1

    Got it all working, any advice on which line(s) of code to modify if I wanted to make the motor turn faster? Thanks :)! Great video by the way!

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      28byj-48 stepper motor has its own limitation and running on its max speed but if you need higher speed then you have to use NEMA 17 stepper motor which is also bigger in size, futher you can search about NEMA stepper motors and its standards along with its data sheet

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      Thank you for watching and subscribing my channel

  • @DSmediaFotoFilm
    @DSmediaFotoFilm Před 3 lety +1

    can you help me please?
    How can I limit the directions of rotation 90 degrees to the left and 90 degrees to the right?

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      you can use limit switches or you may can use servo motor instead

  • @j83telbatalv
    @j83telbatalv Před 2 lety +1

    Thank you the video was so helpful but i just wonder what is the name the program that you used in the beginning?

    • @WaqasFarooq
      @WaqasFarooq  Před 2 lety +1

      for circuit diagram i have used Fritzing software you can download it by going to this link fritzing.org/

    • @j83telbatalv
      @j83telbatalv Před 2 lety +1

      @@WaqasFarooq thank you so much

    • @WaqasFarooq
      @WaqasFarooq  Před 2 lety

      @@j83telbatalv you are welcome and thank you for subscribing my channel

  • @ghostnoobxdlol
    @ghostnoobxdlol Před 10 měsíci

    i cant find the stepper motor and the ULN2003

  • @Math-rg2ee
    @Math-rg2ee Před 3 lety +1

    The program you are working with ????
    Tinkercad ???

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety +1

      this one is fritzing to draw circuit diagram

  • @lacenaepronta
    @lacenaepronta Před 4 lety +1

    Thank you. This is exactly what I was looking for. I read on the forums that is dangerous to power the motor directly with arduino. You should use an external power supply with shared grounding. Is it right?

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      I am glad you like it. 28byj-48 motor only needs 5 volts you can provide it from Arduino and also use external power supply

  • @JoseMendez-bk5re
    @JoseMendez-bk5re Před 3 lety +1

    Thank you so much!!!!!!

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      you are welcome and thank you for watching and subscribing my channel

  • @enriquesandoval4370
    @enriquesandoval4370 Před 3 lety +1

    Hello, I have a question, what is the function of line of code 2
    "define STEPS 32"

  • @etstudio1790
    @etstudio1790 Před rokem

    Nice..I want to connect one stepper motor (5v), 3 servos, 1 display where the button performs a cycle while the lock button repeats the cycle. the display adds up the number of cycles. do you want to help me? :(

  • @hazghaz7223
    @hazghaz7223 Před 3 lety

    how to make the motor back to original position when joystick is released

  • @vaishnavivaishnavi1052
    @vaishnavivaishnavi1052 Před 4 lety +1

    How to use rtc instead joystick.
    To on stepper motor specific time.

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety +2

      well that's pretty cool idea i think i will make it. its will be a very cool project for time-laps camera slider for video content

  • @DSmediaFotoFilm
    @DSmediaFotoFilm Před 3 lety

    Merhaba, 90 derece sağa ve 90 derece sola kısıtlama nasıl yapılır?

  • @sakegalama4401
    @sakegalama4401 Před 4 lety +1

    my stepper motor wont stop spinning, i can let the motor to spin left or right but not let it stop.

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety +2

      kindly check your joystick connection it maybe happening due to loss connection

  • @Vidsro24
    @Vidsro24 Před 3 lety +1

    I got a big problem, I connected everything and verified the code and when I complied it, It happens nothing with the joystick and the motor

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      code is working fine check your joystick connection mostly it happens due to lost connection check the stepper motor connection as well and select the right board in the option

  • @bilalabdullah735
    @bilalabdullah735 Před rokem

    Can I use Arduino nano will it work

  • @deibyjesusrinconlopez727
    @deibyjesusrinconlopez727 Před 3 lety +1

    library pleaseeeeee

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      github.com/Stan-Reifel/TinyStepper_28BYJ_48
      download it from this link

  • @pavletrnic1433
    @pavletrnic1433 Před 4 lety +1

    What is the name of the simulator program at the beginning?

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      Fritzing and also tinkercad you can use both

  • @tanmaymanwar6333
    @tanmaymanwar6333 Před 7 měsíci

    Bro I could not find that green motherboard in thinkercad. That connects motor and arduno. Please tell bro how to add that thing

    • @WaqasFarooq
      @WaqasFarooq  Před 6 měsíci

      you can download the fritzing file from fritzing.org of stepper motor by just google it and you will .fzz file extension file import into you software then you will be able make a circuit diagram
      and thank you for watching

  • @tanmaymanwar6333
    @tanmaymanwar6333 Před 6 měsíci

    Bro this software fritzing is paid. And when downloaded mod version I cannot find 28byj 48 with module. Can you tell me how to find it in normal version. I want that setup

  • @joli5036
    @joli5036 Před 4 lety +1

    I have an error. it says: expected initalizer before 'void'. I don't know what the problem is. can someone help me?

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      kindly check your libraries or try to reinstall arduino software

  • @TheManK-B
    @TheManK-B Před 4 lety +1

    OH that's perfect 👌thanks
    If you don't have problem give me the code please i waiting you .😊

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety +1

      i have pin the code in comment section you can copy it. Thank you for watching and subscribing my channel

  • @done7309
    @done7309 Před 3 lety +2

    how can I control the speed of the ateppers

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      in this video the speed of stepper motor depends on how much you push up and down joystick knob

    • @done7309
      @done7309 Před 3 lety +1

      @@WaqasFarooq - i need a heiger maximum speed

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      @@done7309 28BJY-48 stepper motor speed is not slow not as NEMA 17 stepper motor .
      on top of that this stepper motor running on 5volts if you apply 12 to this small stepper motor you maybe result in burning it up

  • @glennbelga3151
    @glennbelga3151 Před 3 lety +1

    When I verify the code, exit status 1 ' IN4' was not declared in this scope ... What is missing?

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      its because you did not declared the IN4 Pin actually. Try to copy the code from my pinned comment, it works,

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      Thank you for subscribing

    • @glennbelga3151
      @glennbelga3151 Před 3 lety +1

      @@WaqasFarooq I copied the codes and checked it again, but same error message, IN4 was not declared, I update also the libraries! Any advice much appreciated thanks

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      @@glennbelga3151 try to reinstall your Arduino IDE sometimes it happens ,because i compiled this code again its compiles successfully

  • @johndoveysalvador5532

    hello, i love your video btw, but i have a problem. my joystick is different from your joystick
    my joystick is:
    grnd
    +5V
    Vrx
    Vry
    SW

    • @WaqasFarooq
      @WaqasFarooq  Před rokem

      I am really appreciating you like my videos and +5 will connnect wit +ve and GND goes to -ve and Vrx Means Up and Down and Vry mean left and right

  • @nuranuzar
    @nuranuzar Před 5 lety +3

    merhaba kodu yazdım fakat çalışmıyor motor sıkışıyor (mıknatıslaşıyor)

    • @WaqasFarooq
      @WaqasFarooq  Před 5 lety +1

      #include
      #define STEPS 32
      #define IN1 11
      #define IN2 10
      #define IN3 9
      #define IN4 8
      Stepper stepper(STEPS ,IN4,IN2,IN3,IN1);
      #define joystick A0
      void setup() {
      }
      void loop() {
      int val = analogRead(joystick);
      if((val> 500) && (val < 523))
      {
      digitalWrite(IN1,LOW);
      digitalWrite(IN2,LOW);
      digitalWrite(IN3,LOW);
      digitalWrite(IN4,LOW);
      }
      else
      {
      while (val >= 523)
      {
      int speed_=map(val,523,1023,5,500);
      stepper.setSpeed(speed_);
      stepper.step(1);
      val =analogRead(joystick);
      }
      while (val

    • @WaqasFarooq
      @WaqasFarooq  Před 5 lety

      try this code

    • @nuranuzar
      @nuranuzar Před 5 lety +1

      @@WaqasFarooq hata veriyor
      kod için teşekkür ederim
      exit status 1
      stray '\357' in program

    • @WaqasFarooq
      @WaqasFarooq  Před 5 lety +1

      open arduino IDE and go to => Tools => then click on Fix Encoding & Reload . after that look into the code and check if you see and characters which are show at the line where you getting this error

    • @nuranuzar
      @nuranuzar Před 5 lety +1

      @@WaqasFarooq merhaba dediğinizi yaptım
      şu an 5 voltluk motor ilk tek tarafa dönüyor lakin joystick ile sağ yavaş sol hızlı dönüyor 12 voltluk motor ise hiç çalışmıyor

  • @hanscarlosirch8044
    @hanscarlosirch8044 Před 3 lety +2

    what software are you using?

  • @ESTUDIOSSR
    @ESTUDIOSSR Před 5 lety +1

    how can i add a ramp up and down. to start easy and stop smooth?

    • @WaqasFarooq
      @WaqasFarooq  Před 5 lety +1

      yes in this tutorial you can see that how much you push the joystick. it depend on how much further you push the joystick knob

    • @WaqasFarooq
      @WaqasFarooq  Před 5 lety

      maybe you want to vary the speed of start and stop with poteniometer

    • @armwrestling_nerd
      @armwrestling_nerd Před 5 lety +1

      A suggestion is not to draw power from the Arduino, it has not so much amperage to drive motors.
      Put the stepper driver to an own power source that can give the amperage that the motor wants and put the Arduino and driver on common ground.

    • @WaqasFarooq
      @WaqasFarooq  Před 5 lety +1

      @Pelle Chamliden thank you for your suggestion , i have faced this problem when i was working with Nema 17 Stepper motor, so i provided power to motor driver from external source and common the ground wires of arduino and external source, but actually stepper motor driver also need a ground from arduino, you can check out my other videos, thanks again

    • @mibrahim4245
      @mibrahim4245 Před 5 lety

      @@armwrestling_nerd this 5v stepper doesn't draw that much current that needs an external vcc ...

  • @israeln864
    @israeln864 Před 4 lety +1

    Hi; i wand to add one more stepper, what i have to do? thanks

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety +1

      you want to control two stepper motors with one joystick .
      i will make a video and share it with you.

    • @michaelkroon409
      @michaelkroon409 Před 4 lety

      @@WaqasFarooq i want to control an Motirized camera gimbal, driven by 2 nema 17 Steppers and 2 L298n as Stepper drivers. So one Stepper has to drive the Horizontal Movement and the other the Vertical. can you help me with the Scatch? An option is to get an Home position if i klick the joystick button and it find his Home positions with 2 inductive Proximity Sensor Switches.

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety +1

      @@michaelkroon409 you want to make gimble with two stepper motors right. i will make tutorial soon

  • @pandyavivek3651
    @pandyavivek3651 Před 2 lety +1

    WebSite please ???

  • @sswapnil6569
    @sswapnil6569 Před rokem

    Which Software is this?

    • @WaqasFarooq
      @WaqasFarooq  Před rokem

      Fritzing is the name of software you can download it easily by going to fritzing.org

  • @ozgurgoksu8385
    @ozgurgoksu8385 Před 4 lety +1

    perfect

  • @spontique7469
    @spontique7469 Před 4 lety +1

    i have an error it says speed_ is not declared in this scope

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      // include Arduino stepper motor library
      #include

      // define number of steps per revolution
      #define STEPS 32

      // define stepper motor control pins
      #define IN1 11
      #define IN2 10
      #define IN3 9
      #define IN4 8

      // initialize stepper library
      Stepper stepper(STEPS, IN4, IN2, IN3, IN1);

      // joystick pot output is connected to Arduino A0
      #define joystick A0

      void setup()
      {

      }

      void loop()
      {
      // read analog value from the potentiometer
      int val = analogRead(joystick);

      // if the joystic is in the middle ===> stop the motor
      if( (val > 500) && (val < 523) )
      {
      digitalWrite(IN1, LOW);
      digitalWrite(IN2, LOW);
      digitalWrite(IN3, LOW);
      digitalWrite(IN4, LOW);
      }

      else
      {
      // move the motor in the first direction
      while (val >= 523)
      {
      // map the speed between 5 and 500 rpm
      int speed_ = map(val, 523, 1023, 5, 500);
      // set motor speed
      stepper.setSpeed(speed_);

      // move the motor (1 step)
      stepper.step(1);

      val = analogRead(joystick);
      }

      // move the motor in the other direction
      while (val

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      Copy this code and also install the libraries for it,

  • @ddb4
    @ddb4 Před 4 lety +1

    mine just spins and spins when I run it, I cant control it at all, but it spins. any ideas?

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      i think your joystick connection is loose if the connection is not secure well then stepper motor starts spinning and won't stop

    • @ddb4
      @ddb4 Před 4 lety +1

      Waqas Farooq yea I just realized the connection I did was wrong

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      @@ddb4 I am glad to help you please do subscribe my channel

    • @-thehindu
      @-thehindu Před 2 lety

      same problem with me
      when i uploaded the program motor starts rotating even i didnt connected the joystick
      any suggestion??

  • @zachhoffman8514
    @zachhoffman8514 Před 2 lety

    What would I have to do to make it so that it runs 2 stepper motors. I would like to know for a project

    • @WaqasFarooq
      @WaqasFarooq  Před 2 lety

      here is the link to 2nd video czcams.com/video/C0rLXQxHg5w/video.html
      thank you for watching and subscribing my channel

    • @zachhoffman8514
      @zachhoffman8514 Před 2 lety

      @@WaqasFarooq Thank you very much for the tutorial. I'll probably use your channel for more Arduino projects.

    • @WaqasFarooq
      @WaqasFarooq  Před 2 lety

      @@zachhoffman8514 thank you so much I really appreciate this and hopefully I will upload more useful tutorials

  • @galax4210
    @galax4210 Před 4 lety +1

    Can u please say me the software which you used for designing. I have subscribed your channel.

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      I have use Fritzing software for designing here is the link to the website
      fritzing.org/
      Thank you so much for watching and subscribing to my channel i really appreciate it

    • @galax4210
      @galax4210 Před 4 lety +1

      Thanks for saying the software name. 😁

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      @@galax4210 you are welcome

    • @fatmazahramahmoudi9331
      @fatmazahramahmoudi9331 Před rokem

      is it a free software or payfull one
      ???@@WaqasFarooq

  • @_The_Unreal_
    @_The_Unreal_ Před 3 lety +1

    Simulator?? Plz

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety +1

      you can do the simulation on tinkercad and proteus this software is fritzing you can only make diagram

    • @_The_Unreal_
      @_The_Unreal_ Před 3 lety +1

      Can you tell me a simulator name that i can found all component i need like joystick stepper motor and others

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety +1

      @@_The_Unreal_ you can use proteous because you can make joystick into it, tinkercad does not have joystick

    • @_The_Unreal_
      @_The_Unreal_ Před 3 lety +1

      Thanks

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      @@_The_Unreal_ thank you for watching and subscribing my channel

  • @abdellahouarhim2994
    @abdellahouarhim2994 Před 4 lety +2

    SVP LE CODE

  • @enayathabibi3100
    @enayathabibi3100 Před 4 lety +2

    can you give me the full code

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety +1

      // include Arduino stepper motor library
      #include

      // define number of steps per revolution
      #define STEPS 32

      // define stepper motor control pins
      #define IN1 11
      #define IN2 10
      #define IN3 9
      #define IN4 8

      // initialize stepper library
      Stepper stepper(STEPS, IN4, IN2, IN3, IN1);

      // joystick pot output is connected to Arduino A0
      #define joystick A0

      void setup()
      {

      }

      void loop()
      {
      // read analog value from the potentiometer
      int val = analogRead(joystick);

      // if the joystic is in the middle ===> stop the motor
      if( (val > 500) && (val < 523) )
      {
      digitalWrite(IN1, LOW);
      digitalWrite(IN2, LOW);
      digitalWrite(IN3, LOW);
      digitalWrite(IN4, LOW);
      }

      else
      {
      // move the motor in the first direction
      while (val >= 523)
      {
      // map the speed between 5 and 500 rpm
      int speed_ = map(val, 523, 1023, 5, 500);
      // set motor speed
      stepper.setSpeed(speed_);

      // move the motor (1 step)
      stepper.step(1);

      val = analogRead(joystick);
      }

      // move the motor in the other direction
      while (val

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      also subscribe and share

    • @enayathabibi3100
      @enayathabibi3100 Před 4 lety +2

      Thank you.

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      @@enayathabibi3100 you are welcome, Subscribe for more video

  • @vaibhavarepaka2281
    @vaibhavarepaka2281 Před 4 lety +1

    speed_ was not declared in this scope

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety +1

      okay you should download some libraries and then try to compile the code it will work

    • @terrybomerscheim8165
      @terrybomerscheim8165 Před 4 lety +1

      @@WaqasFarooq Hello, nice work here, thank-you. I too am getting" speed was not declared in this scope" error. I have at top of code. What other library do I need to get this to run?

    • @WaqasFarooq
      @WaqasFarooq  Před 4 lety

      @@terrybomerscheim8165 you need to download this library as well "stepper. H " this is also a library

    • @terrybomerscheim8165
      @terrybomerscheim8165 Před 3 lety

      @@WaqasFarooq Well Sir , thank-you, I get this bugger to work. There sure wasn't a library, (you were playing with me there), but the "speed" declaration was fixed by dropping the (_) underscores after the word " speed " in the code. And didn't need any C++ OOP Black Magic F*ckery.

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      @@terrybomerscheim8165 I am glad it worked for you. thank you for pointing out this mistake

  • @stevenA44
    @stevenA44 Před 5 lety +2

    Lose the damn music and TALK DAMMIT!!

    • @WaqasFarooq
      @WaqasFarooq  Před 5 lety

      Thanks for your concern i will put voice over on the future videos and thanks for commenting , I really appreciate your sugesstion

    • @AkınHarrd
      @AkınHarrd Před 5 lety +3

      @@WaqasFarooq its a pretty song tho

    • @WaqasFarooq
      @WaqasFarooq  Před 5 lety

      @Trebuchet thank you i really appreciate that😊

    • @stevenA44
      @stevenA44 Před 5 lety +2

      @@AkınHarrd It is nice music, I'll admit that.

  • @kassemjebbari2242
    @kassemjebbari2242 Před 3 lety +1

    j'ai une erreur au void setup je ne sais pas pourquoi le message dis "Arduino: 1.8.13 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
    Analog_Joystick_step_motor_kassem:12:1: error: expected ',' or ';' before 'void'
    void setup()'{'
    ^~~~
    C:\Users\admin\Documents\Analog_Joystick_step_motor_kassem\Analog_Joystick_step_motor_kassem.ino: In function 'void loop()':
    Analog_Joystick_step_motor_kassem:40:3: error: expected ';' before '}' token
    }
    ^
    Analog_Joystick_step_motor_kassem:40:3: error: expected '}' at end of input
    Analog_Joystick_step_motor_kassem:40:3: error: expected '}' at end of input
    exit status 1
    expected ',' or ';' before 'void'
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

    • @WaqasFarooq
      @WaqasFarooq  Před 3 lety

      you need to select the correct port and Arduino board

  • @ruaaalsalman8041
    @ruaaalsalman8041 Před 2 lety

    what program are you using ?

    • @WaqasFarooq
      @WaqasFarooq  Před 2 lety

      fritzing .thank you for watching and subscribing