Control Servo motor with a Push Button: Move Servo and Return SPB-1

Поділитися
Вставка
  • Опубліковано 25 жов 2024

КОМЕНТАРІ • 259

  • @cubeextrainers8598
    @cubeextrainers8598 3 роки тому +2

    THIS IS SOOO HELPFUL FOR MY PROJECT AND STUDYING
    I WATCH ALL VIDEOS FROM TODAY

    • @robojax
      @robojax  3 роки тому

      Please subscribe. I appreciate it and helps my channel grow. Thank you

  • @jamesfraser7483
    @jamesfraser7483 Рік тому +2

    This is fantastic I've been struggling with a two button set up

  • @prakh1250
    @prakh1250 4 роки тому +7

    THANK YOU. I HAVE SUCCESSFULLY MADE MY DAD"S B-DAY GIFT :DDDDDDDDDDDDD

    • @robojax
      @robojax  4 роки тому +3

      you are very welcome. I am glad you found it helpful.

  • @desmondclyde6835
    @desmondclyde6835 Рік тому +2

    How would i go about coding a servo to move to a certain angle when a button is pushed and back to its original angle when button is pushed again ? Say i wanted the servo to start at 90 but when i push button, servo moves to 180, when button pushed again it goes back to 90

  • @behroozmazlom
    @behroozmazlom 4 роки тому +3

    mr ahmad !!
    thanks for respond as always! just i ordered the relay as you said and im waiting to have it!
    so just we need to modified the code as you told me and thank you so much for helping my on this little project!!👍👍👍

    • @robojax
      @robojax  4 роки тому

      no problem. Sure I will help you. Once you received the relay and tested it with turning ON/OFF your recorder then we post new comment and I will reply.

    • @behroozmazlom
      @behroozmazlom 4 роки тому

      Thank you mr Ahmad
      When I received the relay I will let you know

    • @MCA-bash
      @MCA-bash 6 місяців тому

      @@behroozmazlom Did you recive the relay after 4 years?

  • @merintaha
    @merintaha 3 роки тому +1

    سلاو لەکاک ئەحمەد دەسخۆش سەرکەوتوبی

    • @robojax
      @robojax  3 роки тому

      وعلیکم‌اللسلام. فقط فارسی انگلیسی بلدم

  • @BenjaminMoore-bv6zs
    @BenjaminMoore-bv6zs 6 місяців тому +1

    Thanks for your video! Super helpful for the wiring. I am wondering how the coding would be different if I was trying to use a continuous servo motor instead of a positional servo motor. Is there another video for this? I am trying to have my motor rotate for a specific amount of time then stop until the button is pressed again, running the same command

    • @robojax
      @robojax  6 місяців тому

      Contenouse servo motor is a joke. Not a real product. Only $500 or expensive sevo would work. so use stepper if you need precise positioning. I have more videos on servo, you may find codes that fits to your needs.

  • @mohmmedaluqily8678
    @mohmmedaluqily8678 2 роки тому +1

    Great information, thank you very much

    • @robojax
      @robojax  2 роки тому

      You are welcome. The best thank you for me is to subscribe to my channel Thank you.

  • @danielolivera2618
    @danielolivera2618 8 місяців тому +2

    thank you thank you thank you thank you thank you thank

    • @robojax
      @robojax  8 місяців тому

      You are very welcome

  • @MrBdgr0
    @MrBdgr0 Рік тому +1

    Thanks Mr Ahmad

    • @robojax
      @robojax  Рік тому +1

      You are welcome. The best thank you for me is to subscribe to my channel. Your subscription is stamp of approval and my videos will be suggested to more people and this will help me. I appreciate it. thanks❤️

  • @TrangNguyen-rv4bk
    @TrangNguyen-rv4bk 4 роки тому +2

    Thank you so much!!! I really need it for my project😭😭😭😭

    • @robojax
      @robojax  4 роки тому +1

      You are welcome. As I mentioned in the video I have 2 more videos related to this posted soon.

    • @TrangNguyen-rv4bk
      @TrangNguyen-rv4bk 4 роки тому

      @@robojax You are so nice!!! I'll watch all of them for sure!!! 😊

  • @donaldhenke2750
    @donaldhenke2750 4 роки тому +2

    i really like your videos......... thank you.

    • @robojax
      @robojax  4 роки тому

      Glad you like them!

  • @etis..
    @etis.. 2 роки тому +1

    Well explained, thank you

  • @jomfawad9255
    @jomfawad9255 4 місяці тому

    is it possible to make servo move in loop from 0 to 180 and when i click button the servo stops at its current position? or not possible without position feedback? thank you

  • @laminate31
    @laminate31 4 місяці тому

    Thank you for posting this

  • @adeddy8138
    @adeddy8138 3 роки тому +1

    I want to make a servo controlled by serial monitor only 2 movements taking 90 degree as base position
    for eg for serial command 135 servo will move from 90 to 180 clockwise
    and for serial command suppose 235 servo will move 90 to 180 degrees anticlockwise
    plzz help if you know

  • @Surajborate1
    @Surajborate1 3 роки тому +1

    Your videos are very good
    You put in lot of efforts
    Thank you for giving us this all ready to implement .
    One question please
    If I want to operate two servo motors
    with one push button say servo1 will move from 0 to 180 delay for 2 sec and return to 0 then servo2 should move from 0 to 180 delay for 2 sec and return to 0
    How to code

    • @robojax
      @robojax  3 роки тому

      Thanks. Please search my channel, you will find it. Please don’t forget to subscribe.

    • @Surajborate1
      @Surajborate1 3 роки тому +1

      Subscribed and 👍

    • @Surajborate1
      @Surajborate1 3 роки тому

      @@robojax I regularly watch your videos I have seen V1 V2 V3 using PCA9685 to control multiple servos but not able to modify code for my purpose so I request you to please help me .
      If I want to operate two servo motors
      with one push button say servo1 will move from 0 to 180 delay for 2 sec and return to 0 then servo2 should move from 0 to 180 delay for 2 sec and return to 0
      How to code

    • @matic1265
      @matic1265 Рік тому

      Did you figure it out? I have the same problem

  • @lightningdragon2322
    @lightningdragon2322 2 роки тому +1

    THANK YOU

    • @robojax
      @robojax  2 роки тому

      You are welcome. The best thank you for me is to subscribe to my channel. Thank you.

  • @abhishekjain1578
    @abhishekjain1578 4 роки тому +2

    Hello mr ahmad i really appreciate your work and knowledge and inspire with your circuits, actually i create a circuit for my project with help of your video tutorials, but when i press the button servo go 0 to 180 then return to its position and continously rotating in that direction i dont understand whats wrong , any help is appreciated thank you

    • @robojax
      @robojax  4 роки тому

      Hello, Thank you. Perhaps you have changed the code. I would suggest using it without any change. It should work.

    • @abhishekjain1578
      @abhishekjain1578 4 роки тому

      @@robojax Thank you sir for response to my querry i really appreciate it, but i use your original code without altering it. When button is on motor rotate back and forth then go on without stopping in that direction thats the problem .

  • @moonmatthew
    @moonmatthew 3 роки тому +1

    please how to do it so when i press the button it comes to the angle and stays there ? and when i press it again it will go to the starting angle?? pls help

    • @robojax
      @robojax  3 роки тому +1

      Hi, did you check the links in the description below the video? I have so many types. Check it please

    • @moonmatthew
      @moonmatthew 3 роки тому +1

      @@robojax yes i tried all of the codes and they were kinda buggy and it was not that what i was looking for :(

    • @robojax
      @robojax  3 роки тому

      none of the codes are buggy. Please point to one of them so I fix it. They all have been tested, recorded and the same code has been shared. so whatever you see on the video, you will get the same code. if your result is different, then you are doing something different.

  • @dorjidrugyel8961
    @dorjidrugyel8961 Рік тому

    may i ask for the code of servo motor moving only one direction when push button is pressed. your help will be highly appreciated.

    • @robojax
      @robojax  Рік тому

      I have got tones of codes. Please search my channel

  • @noeulisesmantillatapia4812
    @noeulisesmantillatapia4812 4 роки тому +1

    Hello Mr. Ahmad, how could i change the speed of the servo motor after some seconds of keeping the push boton pressed down

    • @robojax
      @robojax  4 роки тому

      Hello, your project 3 elements. 1-push button -keep pressed 2-servo control 3-certain time. You can watch my videos on servo and learn from them and combined them from this this search result ua-cam.com/users/robojaxTVsearch?query=servo it will need quite some time.

  • @MercXLR8
    @MercXLR8 3 роки тому +2

    Your videos are helpful thank you. I have a project where i'm trying to make a push button servo work along with a 7 segment display. Using a button for movement in the positive direction and a button for movement in the negative direction.
    What I would like the servo to do is. At the press of each button I would like the display to count up and the servo move a certain angle. Press the button again the counter counts up by one and the servo moves up an increment again. Same for down. If I press the down button the servo moves back the same distance. Would you have any idea of how to structure the code to make this happen?

    • @robojax
      @robojax  3 роки тому

      Hello, I have a touch counter video which you can watch, learn and use for this project ua-cam.com/video/5A9jPD5nUCw/v-deo.html I've explained it fully. if you watch it, you can learn and use it very easily.

  • @elienghaus573
    @elienghaus573 4 роки тому +1

    Hello, i watched the entire video and i dont know where i would put a pause in the code

    • @robojax
      @robojax  4 роки тому +1

      hello, this is SPB-1 and I have other version. This just goes and returns and has tones of application. you perhaps need different type. see my servo related videos here ua-cam.com/users/robojaxTVsearch?query=servo

  • @MrKmarley
    @MrKmarley 3 роки тому +1

    Thank you for this tutorial and sketch. How can I limit the movement to only one sweep per press of the button? There are times when the button will be pressed for a prolonged period and I dont want the servo sweeping continuously. Thank you.

    • @robojax
      @robojax  3 роки тому

      you are welcome. I've written so many types of servo with push button, you may search my channel for it or click on this search link ua-cam.com/users/robojaxTVsearch?query=servo

  • @filippus_
    @filippus_ 3 роки тому +1

    Can you make a code to turn the servo 90 with one press, and -90 with the next press of the button?

    • @robojax
      @robojax  3 роки тому +1

      Hi, I have so many videos on Servo with push button. Search my channel and I am sure you will find something that work for you. Here is how to find Specific UA-cam Video in a channel bit.ly/findUA-camVideo

    • @filippus_
      @filippus_ 3 роки тому

      @@robojax Thanks, acctually figuered it out, making a bus with functioning doors and your video was SUPER helpful :D

  • @lasyapothina8663
    @lasyapothina8663 2 роки тому

    sir we stop my servo motor is if press push button 45 degree sir what can u do in code change ples tell me sir .poblem is come back same position

  • @zarkotrajkovic9665
    @zarkotrajkovic9665 2 роки тому

    Hi,
    This video help me a lot. I have a project where i'm trying with one relay or button give angle to motor and when second time push button or signal from relay i need to give different angle to motor. I have 15 diferent angle, how to continue every time with same relay or button and after that motor start to zero point? If you can help me please.

    • @robojax
      @robojax  2 роки тому

      Hi, have so many videos on servo motor. Just search my channel. Here is how to find Specific UA-cam Video in a channel bit.ly/findUA-camVideo all the codes are free. but if you want custom code, I you would have to compensate my time and pay me minimum of $50. if you are interested, then contact me robojax.com@gmail.com so we discuss it. I will not reply to question via this email. it is just for business. thanks

  • @Dropoff510
    @Dropoff510 2 роки тому

    hi thank you for this tutorial. i have a question though is there a way to make the servo go to 180 then stay there until i press the button again?

    • @robojax
      @robojax  2 роки тому

      Hi, yes I believe I have it. Search my channel. learn how to Search for a Particular video in a channel here bit.ly/findUA-camVideo

  • @wheathins5945
    @wheathins5945 2 роки тому

    How could i alter the code in order to make the Servo stay in a position for like 5 seconds than come back with one push button?

    • @robojax
      @robojax  2 роки тому

      Hello, this video is only one of many. Search my channel. Here is how to find Specific UA-cam Video in a channel bit.ly/findUA-camVideo

  • @TheSerious28
    @TheSerious28 2 роки тому

    is there a guide how to make an arduino nano project where You press button once and servo wil go 180 and back every 60 seconds endless until you press button again to stop it working?

    • @robojax
      @robojax  2 роки тому

      Hello, search my channel for "servo" and you will find more videos.

  • @alena_tadiaGame
    @alena_tadiaGame 10 місяців тому

    Sir, is it possible that the servo is controlled by the temperature like if the temperature is greater than 50 the servo will move to 180 and if it is below then to 0..

    • @robojax
      @robojax  10 місяців тому

      yes it is very simple. you gotta learn your temperature sensor code, then learn the servo code. you may learn the concept from this video where the motor speed is controlled by temperature ua-cam.com/video/5xQ8vLavWKQ/v-deo.html

  • @t-bonegaming7295
    @t-bonegaming7295 3 роки тому

    The code works well, but i was wondering if there is a way to toggle the button so when it is held down, the servo will go to 90 degrees and when it is released it goes back to zero degrees.

    • @robojax
      @robojax  3 роки тому

      Hello, I have written times of codes for servo, just search my channel

  • @amziayson1442
    @amziayson1442 Рік тому

    Hey is it possible to control two servo motors like this with separate buttons in one arduino board?

    • @robojax
      @robojax  Рік тому

      You can do as many as you like. I have explained it fully. Simply define the needed variables and you should be okay

  • @backyardcasting5374
    @backyardcasting5374 3 роки тому

    I would like the servo to pause at the end briefly and then continue back how can I do that

    • @robojax
      @robojax  3 роки тому

      I have explained it fully and know at what point it returns, then just add dalay(300); and it will pause for 300ms or 0.3 seconds

  • @stephenbirch6907
    @stephenbirch6907 4 роки тому +1

    Hi, Thanks for the video, it was just what I was looking for. But I am trying to simulate the recoil of a tank gun and need it to travel fast in one direction and then reverse in the other direction but slower.Have watch the video a few time and played with the numbers and get change the speed but only for both direction going the same speed. Can you help . Thanks Steve

    • @robojax
      @robojax  4 роки тому +1

      Hi Stephen, I just spend some times thinking it would be quick fix. but it seems it needs some work and I did not have time to do it.

  • @elliottmarsden1737
    @elliottmarsden1737 4 роки тому

    this really helped but is there any way i could attatch a second servo so they both move at the same time using 1 arduino

    • @robojax
      @robojax  4 роки тому

      very easy. Please watch my video on how to use multiple servo ua-cam.com/channels/kcBSig_Iu4ZnAIeCeG1TVg.htmlsearch?query=multiple+servo and then when you push the button to move the servo, make two servo move. You have watch the video without skipping.

  • @akikoandreialde3479
    @akikoandreialde3479 Рік тому

    Mr. Ahmad is it possible to replace the switch button with RF 433MHz because we will be using a remote instead of push button and this will be our last project and we do not have any clue how to do it because we are still beginners. We need your wisdom and knowledge sir! If possible do you have already a tutorial for this so that we can watch it?

    • @robojax
      @robojax  Рік тому

      Hi, this is Server-Push-Button-1 (SPB-1) but had up to 6 or 7 Like SPB-2, SPB-3... Just search my channel. if you don't knwo how to search a channel, learn how to Search for a Particular video in a channel here bit.ly/findUA-camVideo

  • @mattivirta
    @mattivirta 3 роки тому

    how i move switch power "on" servo have position 0, alltime. then if bush button move 90 degree and back, not more need do. i have one high power 20kg servo who need move 0 to 90 and back thats all. resetting shooting target mechanic

  • @rexmardanan5990
    @rexmardanan5990 4 роки тому

    Sir can you make a tutorial on how to add more servo's and add pushbuttons on each servo...TIA.

    • @robojax
      @robojax  4 роки тому +1

      I have on it my list. I will make at on my first free time. God willing.

  • @joerodriguez6747
    @joerodriguez6747 4 роки тому

    hello - Thanks Frank and robojax. I need to power a Cerbo to turn 90 by just pressing one button. How can I get the complete kit already assembled.

    • @robojax
      @robojax  4 роки тому

      Hello, You can't find such thing as for as i know.

  • @akikoandreialde3479
    @akikoandreialde3479 Рік тому

    Hi Mr. Ahmad I really appreciate your work this is also one of my project and it served as an open and close. Is it possible to add another component like electric solenoid valve to connect to the arduino and operate the same time and program as i pressed the button?

    • @robojax
      @robojax  Рік тому

      Hi, yes of course you can do and use Arduino's otgher pins and features.

    • @akikoandreialde3479
      @akikoandreialde3479 Рік тому

      @@robojax excuse me sir, do you have a tutorial about RF Transmitting Module Remote control servo motor?

  • @kimjongoof5000
    @kimjongoof5000 Рік тому

    I tried making the servos sweep using millis instead of delays and somehow the servo would only sweep if I kept the button pressed down. What am I doing wrong here?
    #include
    Servo servo1;
    Servo myservo;
    #define servoPin 3
    #define pushButtonPin 2
    #define RedledPin 8
    #define GreenledPin 7
    long randNumber(1,2);
    int moveTime = 500;
    unsigned long previousMillis = 0;
    const long interval = 500;
    int buttonPushed =0;
    int step = 5;
    int lightON = 180;
    int lightOFF = 90;
    int position = lightOFF;
    int pos = 0;
    const int minAngle = 0;
    const int maxAngle = 180;
    int i;
    int n = 4;
    const int type =2;
    void setup(void) {
    Serial.begin(9600);
    servo1.attach(servoPin);
    pinMode(pushButtonPin,INPUT_PULLUP);
    Serial.println("Robojax Servo Button ");
    pinMode(RedledPin, OUTPUT);
    Serial.begin(9600);
    randomSeed(analogRead(0));
    }
    void loop(void) {
    if(digitalRead(pushButtonPin) == LOW){
    buttonPushed = 1;
    if( buttonPushed = 1){
    for (i = 0; i < n; i++) {
    unsigned long currentMillis = millis();
    if (currentMillis - previousMillis >= interval) {
    if (servo1.read() < 90) {
    servo1.write(120);
    }
    else {
    servo1.write(30);
    }
    previousMillis = currentMillis;
    }
    }
    }
    Serial.print("random1= ");
    randNumber = random(300);
    Serial.println(randNumber);
    if ((randNumber & 1) == 0){
    digitalWrite(RedledPin, HIGH);
    digitalWrite(RedledPin, LOW);
    }
    if (((randNumber & 1) == 1)&&(randNumber < 100)){
    digitalWrite(GreenledPin, HIGH);
    digitalWrite(GreenledPin, LOW);
    }
    buttonPushed = 0;
    }
    }

  • @penapatriciaann2103
    @penapatriciaann2103 3 роки тому

    sir can you make another video for additional button and servo? please

    • @robojax
      @robojax  3 роки тому

      Hi, This is specific project. But I will see if time permits, I will do it. I have replied to your comment before I believe. if you follow what I said, you can do it. Read the comment.

  • @Thiago_Eletricista
    @Thiago_Eletricista 2 роки тому

    Hello Friend. how can I change one of these sketches to control a servo motor from 0 to 180° with a potentiometer, and with an auto return function. like if the servo is ha 120° I press the button it goes back to 0° and pressing again goes back to 120

    • @robojax
      @robojax  2 роки тому

      Hello, please search my channel for servo. I am sure you will find something. here is how to search for "servo in a channel" ua-cam.com/video/OhkUceBWcHs/v-deo.html

  • @mintmintt8980
    @mintmintt8980 4 роки тому +1

    awesome!! thk you so muchh!!

    • @robojax
      @robojax  4 роки тому

      You are welcome.

  • @Sliccz
    @Sliccz 4 роки тому

    Thank You So Much!!!! I just have a few questions.
    Question 1: how can u do this with a horn button.
    Question 2: what Arduino do you recommend.
    Question 3: my breadboard needs to be quite far from my Arduino for my projects. So what can I do to create more space between the Arduino and the breadboard?

    • @robojax
      @robojax  4 роки тому

      you are welcome.
      1-I have explained every line of code, watch my other servo related videos and you will find something to fit for your need ua-cam.com/users/robojaxTVsearch?query=servo
      2-All arduino boards will work. UNO is the cheapest
      3-yes you can as the servo needs very little power
      good luck

    • @fotiosvakakis1723
      @fotiosvakakis1723 2 роки тому

      How did you end up creating more space between the arduino and the breadboard?

  • @adriansterner8670
    @adriansterner8670 3 роки тому

    I really need some help! I need a program that when I push a button my servo will rotate 360 degress(Yes I have a 360 degree servo) and then stop, and when I push it again it should go back to 0 degrees. Any ideas?

    • @robojax
      @robojax  3 роки тому

      Did you watch the video I have for 360 servo? 360 servo is just joke product, not real product.

  • @aufdraht6470
    @aufdraht6470 4 роки тому

    where do i have to put the delay, if i want a little pause before the servo turns back?

    • @robojax
      @robojax  4 роки тому

      I just watch this video before replying to you making sure I did not miss it. I have explained every line of the text and clearly said "this will change the direction" exactly after than line you will see your delay. But we have two spots in the code where we change the direction. One is when it reaches 0 degree and the other when it reaches 180. So please watch the video without escaping and I can assure you , you will understand everything in the code. Good luck.

  • @kutay_ozkeskin
    @kutay_ozkeskin 2 роки тому

    I want code #3

    • @robojax
      @robojax  2 роки тому

      then you are viewing wrong video. Search my channel. learn how to Search for a Particular video in a channel here ua-cam.com/video/OhkUceBWcHs/v-deo.html

  • @haiderjabaur6109
    @haiderjabaur6109 3 роки тому

    Thank you for this useful vedio. How can I add five push buttons for controlling the continuous servo motor every button for certain angles?

    • @robojax
      @robojax  3 роки тому

      this video is not about that type of servo.

    • @robojax
      @robojax  3 роки тому

      Please read the first comment under this video ua-cam.com/video/b_xvu6wWafA/v-deo.html

    • @haiderjabaur6109
      @haiderjabaur6109 3 роки тому

      @@robojax Thank you, I will See that

    • @haiderjabaur6109
      @haiderjabaur6109 3 роки тому

      Can you send your email? I hope to do some project as patent.

    • @robojax
      @robojax  3 роки тому

      I am sorry, I have no time to communicate other than replying to comments.

  • @nicedaymovie941
    @nicedaymovie941 9 місяців тому

    Hello, I would like to build a similar circuit for a model car (mechanical transmission). It should be operated with 2 buttons (up/down). Each time you press the button, the servo should adjust by 10 degrees (or another defined number of degrees).
    Neutral = 0 position
    1st gear = one down
    Neutral = on up
    2nd gear = one up
    3rd gear = one up
    4th gear = one up
    The entire transmission should then be switched up (UP) and down (down) using 2 buttons.
    It would be great if the “UP” button also had the function if you switched it to its 0 position (neutral) for 3 seconds.
    I would be very grateful if you could help me with this.
    Thank you.
    Greetings Hans

    • @robojax
      @robojax  9 місяців тому

      Hi, please search my channel I have so many video for servo with push buttons

  • @kutay_ozkeskin
    @kutay_ozkeskin 2 роки тому

    I want the servo to move only once when i push and hold the button.. How can i do it ? everytime i push the button, i want it to go from 1 to 179 and come back. Even if im holding the button.. No loop

    • @robojax
      @robojax  2 роки тому

      Search my channel. learn how to Search for a Particular video in a channel here ua-cam.com/video/OhkUceBWcHs/v-deo.html

    • @kutay_ozkeskin
      @kutay_ozkeskin 2 роки тому

      @@robojax this is not helping

  • @dhra09876
    @dhra09876 4 роки тому

    Hello! Could you please tell me if the connections remain same if I use a 4 pin pushbtton? Sorry if this is a stupid question..I'm a beginner

    • @robojax
      @robojax  4 роки тому +1

      no question is stupid question. I just searched and watch few videos to find the right video for you. here is the explanation of how to use that type of push button ua-cam.com/video/2WwedCRwmgA/v-deo.html Please make sure to subscribe. I appreciate it.

    • @dhra09876
      @dhra09876 4 роки тому

      @@robojax Thank you so much sir! It helped me complete my project, I really appreciate your hard work! Subscribed! 😊👍

  • @adrianjeffery7950
    @adrianjeffery7950 3 роки тому

    Hi is it possible to take a 360 degree servo with an Arduino and control it by pushing a button to make it rotate 360 degree and stop then push a second buton to make it return 360 degree and stop. PS love your videos

    • @robojax
      @robojax  3 роки тому

      Hi, I check and replied after 3 days. I wish you had searched for it in my channel here is the video ua-cam.com/video/hVe4TSRV4ww/v-deo.html just search my channel and you will be surprised

  • @rseguras
    @rseguras 3 роки тому

    i have a question, what about if i want to install two servos? (two systems in one arduino)

    • @robojax
      @robojax  3 роки тому

      apply the same method, define pins for each servo and each push button and it should work.

  • @mpume.dzwane9213
    @mpume.dzwane9213 4 роки тому

    Hi! Ahmad. Can you make a tutorial with 2 push button controlling stepper motor independently. If 1 turn motor clockwise the other must turn it anticlockwise and vice versa. More like sensors for the sliding gate. May Allah bless and protect.

    • @robojax
      @robojax  4 роки тому

      Hi, I have lots of stepper motor related videos ua-cam.com/users/robojaxTVsearch?query=stepper check them out.

    • @mpume.dzwane9213
      @mpume.dzwane9213 4 роки тому +1

      @@robojax Thanks a lot for replying. I did check them with all the codes. May the Lord bless you for your kindness. With other tutorials 1 button turn motor clockwise and the other anticlockwise. I want 1 where each button can turn motor clockwise and anticlockwise based on the state of other. Just like the sensors of the sliding gate. Man of God I thank you on behalf of your followers.

    • @robojax
      @robojax  4 роки тому

      you are welcome. I am glad you like them. I will make more videos for stepper motor as people ask lots of question which I can answer. I have no time to make more videos. I have a full time job and that is taking most of my time. Hopefully I quit my job and start working full time for creating educational contents for the world.

  • @regenerate3d481
    @regenerate3d481 Рік тому

    Please can you post the code please its really difficult trying to keep up with video and swapping between software. I'm trying to use two inputs 1) 40 degrees and then 2) 60 Degrees then back to 0 when released. this code looks what in looking for but its hard to copy from screen and then add to code.

    • @robojax
      @robojax  Рік тому

      The code is there below the video . Also I have shown more than 10 times the website name Robojax.com just go there and get it if you cant find description of this video

    • @jamesfraser7483
      @jamesfraser7483 Рік тому

      @@robojax apologies I did notice shortly after leaving comment.

  • @brainwayne8376
    @brainwayne8376 2 роки тому

    What problems do i have if the program runs but won’t load to the arduino

    • @robojax
      @robojax  2 роки тому

      How can you run it without loading it to Arduino?

  • @irfanahmed1681
    @irfanahmed1681 4 роки тому +1

    how to connect two servos to the same code in this case?????

    • @irfanahmed1681
      @irfanahmed1681 4 роки тому

      i want code , wiring and explaination please

    • @robojax
      @robojax  4 роки тому

      what you aks is full video. it can't be explained with few lines. God willing I will make the video you wanted. I have to see when I am free for that. But I have explained everything. if you watch it multiple times to learn how it work, or watch my other videos I am sure you will learn how it work and you can change it for you purpose. but if you don't want to learn, then either wait or pay someone to do it for you.

    • @irfanahmed1681
      @irfanahmed1681 4 роки тому

      @@robojax ok i will be waiting cause it is a very important project and i will be waiting ....thank for replying(please try to solve my problem)

    • @irfanahmed1681
      @irfanahmed1681 4 роки тому

      @@robojax it would be better if you can send me the code and circuit wiring please .....gmail : irfanm.ahmed04@gmail.com and i have tried so any different codes but non of them worked properly (pls it would help me alot .....)

    • @robojax
      @robojax  4 роки тому

      it needs 1 or 2 days of work. I don't have it.

  • @lintangabdillah6035
    @lintangabdillah6035 4 роки тому

    Sir, how about push button on off
    While on, rotate and return (automatically repeat) and push off to stop

    • @robojax
      @robojax  4 роки тому

      I have written code and have the most comprehensive servo video tutorials and can't cover every possibility but I am sure you will find something that you can tweak a little and it will work for you. Here are my videos related to servo ua-cam.com/channels/kcBSig_Iu4ZnAIeCeG1TVg.htmlsearch?query=servo

  • @danshah_kz6420
    @danshah_kz6420 3 роки тому

    Hello sir , my question is .. when servo move to 1-180 and i want it delay for 5s .. after that automove back to 180-1 .. how the code sir? Please reply n help me to solve this problem. Tq

    • @robojax
      @robojax  3 роки тому

      Hello, you just said it , just add delay. I have explained it fully. Watch it 3 ,4 or 10 time until you know how it works and write your own code.

    • @danshah_kz6420
      @danshah_kz6420 3 роки тому

      @@robojax sorry not delay .. i mean it stop for a while like 5second after that the servo move back from 180°-1°..

    • @robojax
      @robojax  3 роки тому

      Yes I have explained it lime by line and mention at what point it goes from 0 to 180 add delay(5000)

    • @danshah_kz6420
      @danshah_kz6420 3 роки тому

      @@robojax ok sir .. thank you ..

  • @Surajborate1
    @Surajborate1 3 роки тому

    Thank you so much
    How to connect ( supply ) red wire of bigger sero like MG 9960R externally

    • @robojax
      @robojax  3 роки тому

      You just said it, “extremely “ so connect it to external power supply.

    • @Surajborate1
      @Surajborate1 3 роки тому

      Thank you Bro
      have you written any book on arduino if yes please let me know I will purchase it. Thanks

  • @AD-mo8tu
    @AD-mo8tu 3 роки тому

    I want my servo to move a portion of the way when I press the button but make it stay where it is. How can I do that?

    • @robojax
      @robojax  3 роки тому

      Here is the search result. I've got tones of code and videos for servo motor ua-cam.com/users/RobojaxTVsearch?query=servo good luck

    • @AD-mo8tu
      @AD-mo8tu 3 роки тому

      Thank you

  • @patelmarvel7300
    @patelmarvel7300 4 роки тому

    excellent video....is there a way to use a single servo with 5 push buttons and on every button press the servo should rotate desired degree angle and get back to starting angle i mean where it actually was ....and this cycle needs to done times of button number....i means for 1st button rotation cycle is for 1 time...for 2nd it is twice and so on till 5 rotation for 5th button.....please help me out if possible.....thnk u

    • @robojax
      @robojax  4 роки тому

      thanks. yes it is possible. Actually the possibilities are endless. This SPB-1 (Servo Push Button 1) and I have more videos. I have mades such video where sevo is controlled over WiFi using ESP32 (sister board of Arduino) you may learn from it. ua-cam.com/video/5TlEgfFDrzI/v-deo.html

    • @patelmarvel7300
      @patelmarvel7300 4 роки тому

      @@robojax thnk u so much... Your videos are so helpful... 😊

    • @robojax
      @robojax  4 роки тому

      you are welcome. I am glad you found it helpful.

  • @kashvinraj107
    @kashvinraj107 2 роки тому

    how to make it rotate more than once after button pressed?

    • @robojax
      @robojax  2 роки тому

      search my channel. you will find more servo and push buttons

  • @penapatriciaann2103
    @penapatriciaann2103 3 роки тому

    hi sir can i add more servo and push button ?

    • @robojax
      @robojax  3 роки тому +1

      Yes you can . Just replicate all veriables and action it should work

    • @penapatriciaann2103
      @penapatriciaann2103 3 роки тому

      @@robojax thank you sir

  • @yogeshitaliya473
    @yogeshitaliya473 4 роки тому

    Nice one

  • @jayantasarkar2653
    @jayantasarkar2653 3 роки тому

    Sir , I'm working on a project for that the servo needs to stay for a while before coming back to its initial position ,
    Means
    0 to 100 .... Wait a bit ..... Again 100 to 0
    Help sir

    • @robojax
      @robojax  3 роки тому

      I have so many videos on servo. My videos are not to just grab the code. Each line has been explained. So watch 4 or 5 videos. May be watch them multiple times until you learn and write your own code. good luck.

    • @jayantasarkar2653
      @jayantasarkar2653 3 роки тому

      @@robojax yes sir I totally understand that it's not good to copy and paste , but as you know that because of this pendamic situation we are not ready at all , and the project is last minute decision from our institute , hope you can understand and help me a lit bit

  • @Mukeshmyson
    @Mukeshmyson 4 роки тому

    can i use touch sensor instead instead of push buttons?

    • @robojax
      @robojax  4 роки тому

      Hi, yes you can. here is my video on touch sensor. watch is carefully to learn how it works. then you can combine the two codes together ua-cam.com/video/sxR5crA0mDU/v-deo.html good luck.

    • @Mukeshmyson
      @Mukeshmyson 4 роки тому

      @@robojax thanku so much sir!!! i watched many videos regarding this code, thanku somuch!!!! now 100% my code will work!!

    • @robojax
      @robojax  4 роки тому

      you are welcome. Goot hear that.

  • @behroozmazlom
    @behroozmazlom 4 роки тому

    thank you so much!!!!
    i clicked on download code but it got me to the different code that,s not related to this video !!! so is there any way to upload the code to my arduino ?
    i was trying to type all the code you explained but i got a lot of errors😢😢
    one more thing im confused what is the servo.h on the beginning? and you said you don,t need to download is part of the arduino IDE?!! so do i need to open the sketch that just works for servos and then need to type the codes? im really beginner!!!!🤦‍♂️🤦‍♂️🤦‍♂️

    • @robojax
      @robojax  4 роки тому +1

      Hi, I just check the link to the code and it is the right code. Yes you don't need to do anything or download anything. If you click on File->Servo->Sweep and if you see Sweep or Knob, you have the library and it should work.

    • @behroozmazlom
      @behroozmazlom 4 роки тому

      @@robojax thank you for respond as always!!
      mr ahmad is that possible to add any sound module or anything to the arduino when the servo move and return then play any sound (my kids voice or music or..) at the end of the servo return??

  • @lasyapothina8663
    @lasyapothina8663 2 роки тому

    45 degree stop sir but it come back same position ples tell mee sir

  • @behroozmazlom
    @behroozmazlom 4 роки тому

    Hi mr Ahmad سلام
    Finally I got my relay as you said and test it with my small voice device it turn on my voice device!
    So just I need your help as we talked about it to turn my voice device after the servo back to zero and stay on for about 10 second
    Thanks

    • @robojax
      @robojax  4 роки тому +1

      وعلیکم السلام آغا بهروز
      I just modified the servo code so the relay is turn ON for 10sec when servo reaches to final destination. Watch the servo video again. it is very simple we have TYPE 1 and Type 2 so . The code is in the page below. Relay is connected to pin 6. you can change it . Good luck.
      www.codepile.net/pile/jzLGM9WJ

    • @behroozmazlom
      @behroozmazlom 4 роки тому

      سلام اغا احمد
      Thank you so much for helping me
      It was helpful !! I have to watch all your video they are good for Learning
      Thank you so much and keep touching برادر

    • @robojax
      @robojax  4 роки тому +1

      I am sorry I missed your comments as I get all of them in one page, I missed your reply. I am glad that you found them useful.
      I am Persian from the Great Khurasan which included Tajikistan, (today) Afghanistan, East of Iran and Southern part of Uzbekistan. By geography I am from Afghanistan. Majority of people of Afghanistan are NOT Afghan like me. Khurasan was changed to Afghanistan about 150 years ago or so by tribe of "awghan" اوغان. and I am NOT Afghan. I am Persian from the same land as مولانا جلال الدین بلخی و حکیم ابوالقاسم فردوسی و سنایی غزنوی و نورالدین عبدارحمن جامی هری و ابن سنای بلخی و هزران عالم و شاعر دیگ.
      I love all humanity and Persians are in my heart wherever they are.

    • @behroozmazlom
      @behroozmazlom 4 роки тому

      Robojax I Love your statement!! God bless you

    • @robojax
      @robojax  Рік тому

      سلام علیکم. مجرا (کانال) فارسی علم و فن را راه اندازی کردم: لطفا به دوستان تان خبردهید و حمایتم کنید.
      www.youtube.com/@ilmofan

  • @egyptstarrk3728
    @egyptstarrk3728 4 роки тому

    Does anyone know if it's possible to connect two servos to one button?? I searched everywhere! Not finding anything😔

    • @robojax
      @robojax  4 роки тому

      I have explained every line of the code. it would be very simple to assign pin to another sensor (or search my other videos) then instead of one servero send the same command to another servo. most of the time people don't watch the video and they don't learn. you gotta watch and learn it. or pay someone to do it for you.

  • @syirah7765
    @syirah7765 4 роки тому

    hi Mr Ahmad! I'm using your tutorial for my project as I am a beginner at arduino (and i know about 0 to no knowledge on it) I've copied and uploaded your code to my board but it's not running, is there any changes I need to make to the code before running my project or do i just copy it straight from the website? Sorry for the silly question!

    • @syirah7765
      @syirah7765 4 роки тому

      by not running, I mean that every time I push the button, it does not do anything

    • @robojax
      @robojax  4 роки тому

      Hi, you just copy and paste and connect the wires as shown, it should work. I would suggest using servo motor without the push button to make sure it works. Then come to this project. I have separated video on that . See the links in the description or search my channel. Good luck.

    • @syirah7765
      @syirah7765 4 роки тому

      @@robojax hi! I tried again and the code runs! the problem is, my servo motor is not moving. Is it a problem with my servo motor or does it have to do with something else?

    • @blaines.smith549
      @blaines.smith549 2 роки тому +1

      @@syirah7765 You might not have a servo library on your IDE

  • @behroozmazlom
    @behroozmazlom 4 роки тому

    thank you so much !!
    mr ahmad!! is that possible to add any sound module or anything to the arduino when the servo move and return then play any sound (my kids voice or music or..) at the end of the servo return??

    • @robojax
      @robojax  4 роки тому

      you are welcome. I don't have the sound device you are working with but (one way is that ) you can do it with relay to turn ON or OFF your sound device (ua-cam.com/video/g6k8sPJyif8/v-deo.html) . if you have sound recorder module (ua-cam.com/video/IfK8z_o5vbk/v-deo.html)
      you can do turn something like this:
      if (angle ==0)
      {
      // Do something else. This can be turning the relay ON or OFF or light or sound device.
      }

    • @behroozmazlom
      @behroozmazlom 4 роки тому

      @@robojax thank you so much for respond!
      mr Ahmad !which relay do i need to buy ? and can you just write the code here for me when the servo back to 0 and then the relay turn on the sound device to play my music(stay on at list between 5 t0 10 second) then off.
      this stuff is really new to me and i'm just trying to get better and thank you for helping us MR ahmad!!!

    • @robojax
      @robojax  4 роки тому

      No problem. Please tell me how are you playing the music? is it operating with AC or battery?
      I visited your channel. Nice videos. Specially Ava's song is so nice. Banafsheh is very expert in swimming.

    • @behroozmazlom
      @behroozmazlom 4 роки тому

      Robojax tthank you so much for being kind and your nice comment!!
      I have an old voice recorder just I’m trying to use that and it is working with dc 6 volt!!
      And I want to connect the play button to a relay(that controll with arduino)that you talked about it !!
      Or any other way you may suggest to me!!
      The plan is when the servo moved and back to 0 then a sound be played (5 to 10 second)

    • @robojax
      @robojax  4 роки тому +1

      You are welcome. سلامت باشید.
      because the voltage is different, then you have to use relay to turn it ON and OFF and have separate 6V power supply for the recorder. So use the relay link I mentioned above. Once you are successful to turn ON and OFF the relay and your recorder, I will modify this code so you can use it with relay. Please make sure to post a new comment because I have one page where it shows comments, new comments are shown at the top and your comment in terms of time counted with the first comment and it is way below. So I hope I don't miss it.

  • @OctAngel
    @OctAngel 3 роки тому

    Thank you for this video man! Btw I need help on trying to control servo motors using the L1 and R1 buttons on my wireless ps2 remote, I'm trying to control 6 servo motors for my robotic arm but I can't control them all because I can only control 4 total servos with the joysticks, I'm not really familiar with Arduino code so could you plz help me with a little code regarding on controlling a servo motor with the L1 and R1 buttons, this is for a project at school.

    • @robojax
      @robojax  3 роки тому

      you are welcome. I have no video on PS3/PS2 controller and have no experience.

  • @anguega7591
    @anguega7591 4 роки тому

    you are the best ! Congratulations! can I , down the arduino code?

    • @robojax
      @robojax  4 роки тому

      Thank you. the link to code is under the video in the description.

  • @sachinmestry6385
    @sachinmestry6385 2 роки тому

    Nice video
    Sir can you please help me out
    I need this type
    First I press button servo motor will move 0 to 90 degrees
    After some time I press that so servo motor will came back from 90 to 0
    Now here the main challenge
    Again I press the button now servo motor will move from 0 to 90 degrees...
    Now suddenly power supply turns OFF
    In this case I need that servo motor should be came back
    from 90 to 0 degree...
    Is it possible ?
    Please help 🙏 me....Thanks

    • @robojax
      @robojax  2 роки тому

      Hi, I have so many videos on servo. please search my channel and I am sure you will find something useful. the links should be in the description or search for videos in my channel. if you don't know how to find a particular video in a channel , then please watch this video ua-cam.com/video/OhkUceBWcHs/v-deo.html

  • @itwasntme455
    @itwasntme455 3 роки тому

    Where do you get the single wire extensions?

    • @robojax
      @robojax  3 роки тому

      It is. Called Dupont wire

    • @robojax
      @robojax  3 роки тому

      I reply? I told time you reply. Always reply back to any responds to you, else you teach them not help people

    • @itwasntme455
      @itwasntme455 3 роки тому

      Thank you

  • @Vanshfunee
    @Vanshfunee 4 роки тому

    Hi sir,
    How to control multi relays with android phone. Control with Gyroscopes also.

    • @robojax
      @robojax  4 роки тому

      this is relay control over bluetooth ua-cam.com/video/-E9J9ExdZ20/v-deo.html for gyroscope, I have tested code to just read values ua-cam.com/users/robojaxTVsearch?query=gyroscope

  • @quiana7019
    @quiana7019 2 роки тому

    does anyone know how i can get a 5 sec delay before the servo goes back?

    • @robojax
      @robojax  2 роки тому

      Here is 30 minutes Arduino course ua-cam.com/video/Mbb2xa1WcRM/v-deo.html

  • @GuilhermedaSilvaCaetano0095
    @GuilhermedaSilvaCaetano0095 2 роки тому

    I want to make the bumblebee of the transformers can you help me For him to transform fast with 18 micro servo motor all together and the others 2 is for him to go and come back send the SKETCH please thank you

    • @robojax
      @robojax  2 роки тому

      You either need to learn and do it yourself here Arduino Step By Step Course By Robojax
      ua-cam.com/play/PLHvJ4bw0xno6THv-TQLf8lwVvY_23z75d.html or pay someone to do it for you

  • @楊宜展-b8q
    @楊宜展-b8q 3 роки тому

    Why does my motor keep turning when pressed thank you.

    • @robojax
      @robojax  3 роки тому

      because it is programmed like that. I have tones of more videos and code that does different things with servo. search for it

  • @Surajborate1
    @Surajborate1 3 роки тому

    I regularly watch your videos I have seen V1 V2 V3 using PCA9685 to control multiple servos and control servo motor by potentiometer also but not able to modify code for my purpose so I request you to please help me .
    I want to operate two servo motors with one push button say servo1 will move from 0 to 180 delay for 2 sec and return to 0 then servo2 should move from 0 to 180 delay for 2 sec and return to 0 by pressing one one pushbutton.

    • @Surajborate1
      @Surajborate1 3 роки тому

      Please reply

    • @robojax
      @robojax  3 роки тому

      Hello, I try to answer question related to the video only. got no time to write code. you can seek help from Arduino forum forum.arduino.cc/ or watch 2, 3 , 5 or 10 videos to learn it as I have more than 20 videos on servo all fully explained or hire someone here www.upwork.com/

  • @albylikeshalloween
    @albylikeshalloween Рік тому

    how can I speed the servo up

    • @robojax
      @robojax  Рік тому

      you can slow it down. if you need faster motor , then use NEMA17 stepper motor. just search my channel for Stepper.

  • @alexanderbangsund2466
    @alexanderbangsund2466 3 роки тому

    mine doesn't work, nothing happens when I push the button and it just keep spinning contious

    • @robojax
      @robojax  3 роки тому

      Test it with sweep code first make sure servo motor is working ua-cam.com/video/kZ9b31gVemc/v-deo.html

  • @sh.6048
    @sh.6048 3 роки тому

    Have you ever used tinkerkad

    • @robojax
      @robojax  3 роки тому

      what is that?

    • @sh.6048
      @sh.6048 3 роки тому

      Go with vpn

  • @pranavmucharla3020
    @pranavmucharla3020 3 роки тому

    How do you build it

    • @robojax
      @robojax  3 роки тому

      You build it with your application.

  • @lasyapothina8663
    @lasyapothina8663 2 роки тому

    🚰 our ball valve is open if water tank full float switch touch push button that ball valve close but not close but at a time open sir.ples any help sir

    • @robojax
      @robojax  2 роки тому

      Just search my channel. I have so many servo with push buttons.

  • @Pizzacam3
    @Pizzacam3 2 роки тому

    Man... I would LOVE to be able to apply one of these(preferably with a wireless remote control, programmable distance just up and down maybe 25° or 30° that runs with a or some batteries) to a sort of PROP I own from Chuck E Cheese that’s plastic with his face and normally with compressed AIR and the tiny cylinder on the back make a piece move down then back up to create the appearance that he’s winking. I just have it propped open now but would love to be able to activate it via remote.

    • @robojax
      @robojax  2 роки тому

      Hi, here is the video showing how to use remote ua-cam.com/video/LVd9_i-BQcg/v-deo.html and I have more videos on controlling servo motor. Just search.

  • @irfanahmed1681
    @irfanahmed1681 4 роки тому

    @Robojax bro from the last 2 days i have tried so much but i was not at all succesful at moving 2 servos with 2 different push buttons so that when the button is pushed the motor completes 180 degress and comes back .... i asked a few people who were familiar wit arduino but they didnt do much ... it would make a huge difference if you could help me with this .... looking forward to your reply

    • @robojax
      @robojax  4 роки тому

      Hi, most of the time people skip. I you want to learn, then watch this video and pay attention to the Code section and learn about "Object" ua-cam.com/video/_uz7YcOzvjU/v-deo.html one you did, then you can use customize this code very easily. Good luck. but if you skip, you will not learn and won't be able to do it.

  • @1Homelife
    @1Homelife Рік тому

    I copied the code and I get this message.....
    exit status 1
    redefinition of 'void setup()'

    • @robojax
      @robojax  Рік тому

      Yea very simple. You colours the code without removing the previous code. Pay attention . I have fully explained it

  • @ITavares
    @ITavares 2 роки тому

    0:54 you looked like Frankenstein

    • @robojax
      @robojax  2 роки тому

      LOL. you made me watch it. LOL.

  • @Burak-ys4vl
    @Burak-ys4vl 3 роки тому

    hello i need help you

    • @robojax
      @robojax  3 роки тому

      Hello and you are welcome.

    • @Burak-ys4vl
      @Burak-ys4vl 3 роки тому

      @@robojax A program will be written to provide angular control of 4 servo motors with Arduino. There will be 37.5 degrees of angle difference between each servo. All of them will be programmed to change at the same time. Control will be provided with a single button. each will be shown by led at the same time

    • @Burak-ys4vl
      @Burak-ys4vl 3 роки тому

      @@robojax my homework pls help me

    • @robojax
      @robojax  3 роки тому

      you gotta learn to do it. I've fully explained it. if you don't do it, it is cheating. I am educator, here on UA-cam and in my personal life. you gotta get your marks by learning and answering. World will be a good place if people cheat. Good luck.

    • @Burak-ys4vl
      @Burak-ys4vl 3 роки тому

      @@robojax thanks but i did

  • @mohamadhafiz6099
    @mohamadhafiz6099 4 роки тому

    Hi sir,,
    Can you help me with this code i have?. I want to put button switch just like your video in my project..
    My project is rfid door lock with lcd,servo. At down here the code i use.. Can you combine your code with my code?
    // Include required libraries #include #include #include #include // Create instances LiquidCrystal_I2C lcd(0x27, 16, 2); MFRC522 mfrc522(10, 9); // MFRC522 mfrc522(SS_PIN, RST_PIN) Servo sg90; // Initialize Pins for led's, servo and buzzer // Blue LED is connected to 5V constexpr uint8_t greenLed = 7; constexpr uint8_t redLed = 6; constexpr uint8_t servoPin = 8; constexpr uint8_t buzzerPin = 5; String tagUID = "29 B9 ED 23"; // String to store UID of tag. Change it with your tag's UID void setup() { // Arduino Pin configuration pinMode(buzzerPin, OUTPUT); pinMode(redLed, OUTPUT); pinMode(greenLed, OUTPUT); sg90.attach(servoPin); //Declare pin 9 for servo sg90.write(0); // Set initial position at 90 degrees lcd.begin(); // LCD screen lcd.backlight(); SPI.begin(); // Init SPI bus mfrc522.PCD_Init(); // Init MFRC522 lcd.clear(); } void loop() { lcd.setCursor(0, 0); lcd.print(" RFID Door Lock"); lcd.setCursor(0, 1); lcd.print(" Show Your Tag "); // Look for new cards if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } // Select one of the cards if ( ! mfrc522.PICC_ReadCardSerial()) { return; } //Reading from the card String tag = ""; for (byte i = 0; i < mfrc522.uid.size; i++) { tag.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ")); tag.concat(String(mfrc522.uid.uidByte[i], HEX)); } tag.toUpperCase(); //Checking the card if (tag.substring(1) == tagUID) //change here the UID of the card/cards that you want to give access { // If UID of tag is matched. lcd.clear(); lcd.setCursor(0, 0); lcd.print("Access Granted"); lcd.setCursor(0, 1); lcd.print("Door Opened"); sg90.write(90); digitalWrite(greenLed, HIGH); delay(3000); digitalWrite(greenLed, LOW); sg90.write(0); lcd.clear(); } else { // If UID of tag is not matched. lcd.clear(); lcd.setCursor(0, 0); lcd.print("Wrong Tag Shown"); lcd.setCursor(0, 1); lcd.print("Access Denied"); digitalWrite(buzzerPin, HIGH); digitalWrite(redLed, HIGH); delay(3000); digitalWrite(buzzerPin, LOW); digitalWrite(redLed, LOW); lcd.clear(); } }
    i want open the door from inside because my scanner rc522 at outside.

    • @robojax
      @robojax  4 роки тому

      Hi, I have left nothing unexplained. So watch it carefully (without skipping) to understand it. Then you can customize it.

    • @mohamadhafiz6099
      @mohamadhafiz6099 4 роки тому

      @@robojax i fail every time combine the code.. and i fed up right now.

  • @mattivirta
    @mattivirta 3 роки тому

    NO, servo plus volt and gnd need be to own battery not arduino, only arduino to servo need gnd all together. arduino board not handle all power what servo need. burn arduino board. all schematic have servo gnd to arduino AND battery, power plus wire to only battery, and data to arduino. battery power can use servo and inbut connection to arduino board bu not servo to arduino board. only data out arduino to servo.

  • @irfanahmed1681
    @irfanahmed1681 4 роки тому

    no brother i am good i am not interested in hiring someone all i wanted was to get some help thats it

    • @irfanahmed1681
      @irfanahmed1681 4 роки тому

      all i wanted was some help to finish my project .....but after submitting my project i was gonna learn arduino bro ...................

    • @robojax
      @robojax  4 роки тому

      You need it now. If you don't learn now you will never try because you won't need it. see my servo related videos here ua-cam.com/users/robojaxTVsearch?query=servo and I am sure you will find something that helps you. Also see this image snipboard.io/AHhRpV.jpg

    • @irfanahmed1681
      @irfanahmed1681 4 роки тому

      @@robojax ok bro thank for replying to all of my commment ..... i have tried alot but i dont know what the right code was.... i am not saying that i am not trying at all.. i have tried alot ....then only i came and asked you about my doubt..... thank you for all you did ....i am trying my best but i am still failling...bye.

  • @irfanahmed1681
    @irfanahmed1681 4 роки тому +1

    pls help

  • @burry31
    @burry31 3 роки тому +1

    axain is sooooooo bad fix it In dont understand anythink

    • @robojax
      @robojax  3 роки тому +1

      LOL. AXAIN 😂sorry I don't speak Italian or Pilipino. Canadian English.