Arduino Robot Car with Speed Sensors - Using Arduino Interrupts

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024

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

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

    Decided to spend the corona lock down learning Arduino. So very glad I found your channel.

  • @andreaszervas7546
    @andreaszervas7546 6 лет назад +4

    hi and thank you for this work, it's a great start for me.
    Some improvements I did in the move routines code:
    1. if you use "II" instead "&&" in "while", then the movement finish when both motors end at the same number of steps.
    2. instead of "steps > counter_A" I use "counter_B >= counter_A" and instead of "steps > counter_B" i use "counter_A >= counter_B".. in this case each motor waits the other to complete same number of steps, so the movement is straight.

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

    I am teaching myself Arduino and to a smaller extent robotics. I have followed your excellent tutorials about the robot car and every detail is clearly explained and easy to follow. The instructions on Interrupts (and the link to Nick Gammon) made my project jump ahead in leaps and bounds. I did find that the last code would not run until I put a few pinMode(??, OUTPUT) instructions in the setup to define the Arduino to L298N driver pins. Once they were set, away we went. Thanks again and I'm looking forward to your continued additions to the car.

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

    Thanks for the wonderful video. I am dding these comments *again* even though you have replied to similar comments. But I was looking for some *errata* in the text or in the video about that. After 3 years, it will take some digging to get to those comments, hence to help the late comers like me. Advance apologies.
    39:00 - Adding 0.5 to the float value and casting to (int) will automatically do a upward rounding.
    44:40 - 25.4 cm is 10 inches, not 1 foot. One foot is 2.54 x 12 = 30.48 cm

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

    I understood everything whatever you explained.
    Love from India 🇮🇳

  • @eclecticlife
    @eclecticlife 2 года назад +1

    Excellent instructional video! Your videos are clear, easy to understand, and to the point. Thank you for all the effort and for sharing your knowledge.

  • @Aegir1001
    @Aegir1001 6 лет назад +3

    A big thank you for a nice and informative tutorial. I was pondering whether to start to learn Arduino and found your channel after a short search. Very interesting - now I'm hooked!

  • @PG-qz6mg
    @PG-qz6mg 2 года назад

    Thank you very much for your videos. I'm french but i understand very well your english !

  • @toilaxuannam
    @toilaxuannam Год назад +1

    Absolutely amazing video for beginners like me. Really appreciate it🎉

  • @julenlaskibar5409
    @julenlaskibar5409 6 лет назад +3

    My compliments and applause. Simply amazed by such a well structured lesson.

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

    This video just drove me crazy.....Such a great explanation......

  • @CountryNerd639
    @CountryNerd639 2 года назад +9

    I really like watching your videos. You explain the project in a way that I can understand. Most tutorials fly through the steps that some of the information is missing, or glossed over. That is why I appreciate your style of teaching.

  • @ashr
    @ashr 3 года назад +10

    I learned more about Arduino programming from this video in 40 minutes, then I did in almost 1 semester of my college classes that teaches us to work with the Arduino Uno.

    • @kyrofromgahool2009
      @kyrofromgahool2009 2 года назад +1

      Mb you should have stopped making part times and start following the course((?

  • @andur63
    @andur63 6 лет назад +33

    This video is worth every minute watching, you made such a fine job, Thank you!

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

    very well done, congratulation. I love the details and the clarity of your explanation. Keep up the good work

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

    You are simply the best. I love your videos. They have helped me multiple time.

  • @karalekasgeorge1252
    @karalekasgeorge1252 5 лет назад +1

    Bravo from Greece..

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

    Excellent video, very easy to follow. Looking forward to the radio control video because that’s where I’m currently at with my own arduino robot project. Thank you for taking the time to make this.

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

      Glad you liked it, stay tuned as the remote control will be coming very soon.

  • @pantuflip
    @pantuflip 6 лет назад +1

    Un gran aporte, sobre todo en la parte del código de las interrucciones.
    Nice contribution, Very good information about interruptions.

  • @roniosteicoechea9190
    @roniosteicoechea9190 6 лет назад +5

    This am amaizing channel! Really you are doing a beautiful job!

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

    Thank you for this tutorial!

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

    Just a little note. Any variable that will be changed by interrupts should be defined as "volatile". So, counter1 and counter2 should be defined as volatile.

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

    Excellent video, glad to see back. I'm looking forward to your development of this robot. I like the explanation of the use of interupts.

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

      Glad you enjoyed it and I'm glad to be back. I'll definitely have more on the evolution of this robot very soon!

  • @dr.psprojects9591
    @dr.psprojects9591 4 года назад +5

    Is there an amazon link for this introductory kit? I can't seem to find it on the website.

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

    A great video explanation - very thorough and easy to understand. Awesome !!

  • @spwim
    @spwim 5 лет назад +2

    My remark : if you hope to get your car running perfectly forward and make perfect 90 degree turns with this setup, dont get your hopes up.
    The quality of those plastic gearboxes is, with my experience, just too low to achieve that goal.
    The problem is the relation PWM to speed is not linear and the motors dont break free at the same moment.
    So you have motor 1 already started while motor 2 is still stalling, leading it to make a turn.
    I have tried to compensate for these shortcomings in many many ways, but none seem to work in a satisfying way.
    Things i have tried : determining the breakfreepoint, linearise motor speed, use just one fixed speed and try to determine best PWM setting to obtain this, start with a short boost of 200/55PWM to break free and lower to desired speed after, adapt the motor speed while running forward. (if the difference in the counts is too great, make the faster motor slow down).
    I tried switching out gearboxes, i have many of those here. All of it didn't lead me to the stable predictable behavior i was looking for....
    I am going to switch to stepper motors for my requirement and/or do some tests with metal gearboxes later, i have hunch the main culprit are those plastic gearboxes, the tolerances on those just are not high enough for stable performance.
    PS.: if you use the change interrupt instead of the rising one you can double your resolution at no cost

    • @YvanR0Y
      @YvanR0Y 5 лет назад +2

      Great info, thanks for the insights from your experimenting.

    • @spwim
      @spwim 5 лет назад +1

      @@YvanR0Y np! Good luck on your project?

    • @48Harmonica
      @48Harmonica 5 лет назад +1

      @@spwim Hi. How can i contact with you? I need some help and i have some questions. halilsen.h@gmail.com

  • @BTSARMY-zi6ph
    @BTSARMY-zi6ph 3 года назад

    Wow, that is so smart! Thank you for all the tips for my robot!

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

    The way you demonstrate is really amazing... I look forward for your others tutorials and can you make some videos on IOT...

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

      Glad you enjoyed it. I have several IoT videos and articles planned, they will be out very soon.

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

    This is a great tutorial. thanks alot for your excellent way of presenting.

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

    very important basic concepts . Thank you

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

    you are incredible good at this. Thank you very much

  • @GaryParkin
    @GaryParkin 4 месяца назад

    I love watching your content. Thank you so much. I was looking on Amazon for the chassis and there are a few. Any reason why you chose a 2 wheeled over the 4 wheeled one? I'm looking forward to ordering the parts and making stuff.

  • @abd-elrahmanmohamed9839
    @abd-elrahmanmohamed9839 6 лет назад

    Really great and full explained . Thanks a lot !

  • @tegekgast
    @tegekgast 6 лет назад +18

    Excellent timing! Just got into this thing and wondered how the heck the speedometer things work, the Chinese instructions aren't much help and you are a hero doing this series in your calm and structured way, much appreciated!

    • @Dronebotworkshop
      @Dronebotworkshop  6 лет назад +8

      Glad that my timing worked out so well for you, let me know if you have any additional questions.
      The stuff we can get now from China is of incredible value but it does tend to lack a lot of useful instructions, which Is one of the reasons I made the video. Happy to hear you found it useful.

  • @bennedhedegaard4971
    @bennedhedegaard4971 4 года назад +6

    This is an incredibly valuable resource, thank you for your work!

  • @MrEerilybasic
    @MrEerilybasic 5 месяцев назад

    Thanks Bill

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

    Very good work sir. I've been wanting to learn this information for some time. Thank you very much.

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

    Great project!
    Nice project to build in this season.

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

      Glad you enjoyed it, let me know how your build turns out. Remember that you can get all the code on the website at dbot.ws/rbtcar

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

    Great work sir, Loved it alot

  • @wuzhenick
    @wuzhenick 6 лет назад +1

    I was thinking at the end when you demonstrate the control of 1 step. How much would’ve the wheel actually turn after the power’s being cut and how do we measure it and encounter the accuracy problem (if there’s any)?

  • @bluehornet6752
    @bluehornet6752 5 лет назад +2

    Great video.
    Your > is "greater than" not less than... You said it correctly towards the end, but it was confusing when you said it incorrectly while explaining the logic of your functions. Excellent demonstration though on the use of optical sensors, comparators and interrupts. Great stuff!

  • @VerifiedUser-DE
    @VerifiedUser-DE 6 лет назад +5

    The way you explain everything is amazing ..which let me stick till last...waiting for more material ..mostly excited about IOT

  • @5KA4
    @5KA4 5 лет назад +5

    49 minutes of "I wanna commit arduino short circuit"

  • @andreaszervas7546
    @andreaszervas7546 6 лет назад +4

    Excellent work! You are a great teacher. I found you last week and learn from you things I m looking for months before. Thank you and keep uploading!

  • @Plitschosplatschos
    @Plitschosplatschos Год назад

    Great! Thank you! 🙃

  • @Webendowed
    @Webendowed 4 года назад +10

    I'm new to the group and I must say this is great. I'm learning so much and having thought provoking ideas as well. Thank you for these great videos DroneBot Workshop

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

    Amazing , Thanks a lot 😍

  • @pastrana2000
    @pastrana2000 5 лет назад +5

    Outstanding video! You really explained things here in layman's terms which helped tremendously.

  • @kboo918077
    @kboo918077 6 лет назад +3

    Thank you for the very good videos you make, they are very clear, very good work. I have a question, could you do a video that show an example of PID controller maybe with this kit? It could be very interesting to make a speed and another with a position controller. Thank you very much

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

    Actually, 25.4 cm is 10 inches (1" = 25.4 mm). A foot is about 30cm.
    Simplest way to get a rounded value is to add 0.5 before doing the truncate (or cast). (or use a lib function which does that'I suppose)

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

    Could you pls explain about L298 Dual H-bridge motor controller: does it receive only 1 PWM signal at the same time to control motors in propotion, or can it receive two independant PWM signals from Arduino two control MotorA &MotorB output independantly?

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

    Why do you use TimerOne library here but not when the motors are regulated in the final sketch?

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

    Such an informative video! Great. As for the basic optocoupler without any circuit boards; Can it still be used in the same way? I have those on hand and would prefer if i did not need to add an additional pulldown resistor.

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

    Hi Bill
    I have found your lesson very helpful.
    Question - is there a way to display the RPM and Speed values on a OLED Display? John

  • @magdy7308
    @magdy7308 3 года назад +1

    seems that the site has dropped can anyone share the code please ?

  • @1DR31N
    @1DR31N 3 года назад +2

    It cannot be better. What a great video. Words aren't enough to praise your job. Congratulations, you deserve the best.

  • @med6402
    @med6402 5 лет назад +3

    that is the biggest duracell battery i have ever seen

  • @wishicouldarduino8880
    @wishicouldarduino8880 5 месяцев назад

    I need this for the base but I'm using cytron motor drivers they should work I hope lol.

  • @j.s.7547
    @j.s.7547 6 лет назад

    Just one small hint. At about 39 min you said that rounding a number is too complicate.
    No it's not. Just add 0.5 to the float before casting it to an int. :)

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

      Now that's ingenious, thanks a lot! Simple yet effective.

  • @ahmadzakki8917
    @ahmadzakki8917 6 лет назад +1

    thank you from indonesian!

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

    why not use loop with milli() ?thank you very much

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

    Tore an rc toy car to get those motors.Finally ordered the kit since I needed those speed sensors and a couple of nrf2401L´s. Really learned a lot. Would it be possible to make another vid about the rbtcar using 2 nodemcu´s to control it wireless? Thanks!

  • @duylekhac6044
    @duylekhac6044 5 лет назад +2

    You deserve so much more than 93K sub. Love your videos!

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

    Thank you very much! I mainly came here to begin to understand interrupts. I'm on my way!

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

    Another way I found to make it go straight is using a compass and following a heading , so if something interferes with the robot it wil autocorrect and using encoders too he can know the distance .

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

    we can use encoder sensor to record move of the car ?

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

    Thank ou for the lecture. Please do remote with wifi or bluetooth. Thanks a lot.

  • @332ARA
    @332ARA 9 месяцев назад

    I have a car project for something like this. I'm new to Arduinos etc. I would like to make a automobile trip computer. I would need to process two hall effect fuel flow meters and either a square wave speedometer cable generator or incorporate GPS module. Need to display Distance, Instant MPG, Average MPG, Speed. To bench simulate the sensors I was thinking of using 3 of these motors individually controlled with hall effect wheels. I know one L298 with drive two motors. How many motors will one UNO drive? Can I individually control 3 motors? This all for the main project of an automotive tripmeter. Or is there some sort of simulated signal function should use in the software?

  • @shivpat6522
    @shivpat6522 7 месяцев назад

    Hello. Thank you very much for giving this really informational and nice tutorial. I had a question regarding the code at 19:40 of your video. There is a TimerOne Library and I installed it from Paul Stoffregen's GitHub, but when I uploaded and tried running the code, I got Compilation Errors for 'class TimerOne' has no member named 'detachInterrupt', 'class TimerOne' has no member named 'aatachInterrupt', and 'class TimerOne' has no member named 'initialize'. The lines are in Void Setup (Second Line and Last Line) and Void ISR_Timerone (First Line and Last Line). My code is a direct copy of yours, so can you reach out to me as to why this didn't work on my side?

  • @luistorres-duarte1088
    @luistorres-duarte1088 3 года назад

    I am trying to build a similar device, I am having a hard time to find the optical source sensor, what is the name of the same one used on this project? Thank you

  • @JorgeGarcia-ff3mu
    @JorgeGarcia-ff3mu 2 месяца назад

    Thanks for the video... I've built a cart using the same electronic components but I can't get the cart to move straight in either the forward or the reverse direction, and the distance that the cart moves is far less than the distance I put in the program. I've checked the logic over and over and it seems to be OK . I have the sneaky suspicion that the the HC-20K opto encoder is actually OVER counting steps! I checked my code by putting serial prints in strategic places and the code correctly calculates the correct number of steps for a given distance and the routines do start and stop the motors until the correct step count is reachedHence my suspicion that the speed sensors are reporting more steps than what have actually occured.
    To give you an idea, my wheel diameters are 66.2 mm - so the circumference is 3.14156 x 66.2 = 208 mm . When I input 208mm the subroutine correctly calculates that 20 steps are needed and the motors are turned until the ISRs report that the step counts reached 20 steps, but one wheel turns ~290 degress while the other turns only ~180 degrees.
    I am guessing that the interrupt pins are seeing a noisy signal and that some of that noise is triggering the ISR.
    As I am writing this, I am also thinking that I am running both the arduino and the motors using the same battery... perhaps that may be the source of the noisy signal on the ISR pins? I want to run on a single 9 battery because my cart is about 1/3 of the size as yours. I set myself the challenge top make everything as compact as possible.
    Have you or any of your subscribers come across this? Is there a solution?

  • @benkessler7267
    @benkessler7267 7 месяцев назад

    Hi, I have some questions about the power supply. Could you power both the Arduino and the L298N off the 9V? My chassis is much smaller, so I am trying to reduce space. Also, can't you power one of the two boards off the 5V supply of the other? Is there some risk of over-currenting if too many sensors are connected to the 5V supply on the Arduino? Thanks!

  • @timrobinson7152
    @timrobinson7152 2 года назад +1

    Just a few short comments. First, please note that 25.4 cm is NOT "about a foot." It actually is 10 inches.
    Second, while I enjoyed your video, as I always do, I came here looking for a way to control SPEED of two motors so they track accurately together. After all, the encoder disk is referred to as a "speed sensor". The motors you used, quite visibly, do NOT both turn at the same rpm, as the car drifted to one side when it moved. That was also obvious during your first demonstration showing rpm on the Serial Monitor. The two numbers were not in sync. If you do not have a video that addresses this issue, please consider making one.
    Thank you for your time and efforts producing these videos. I enjoy them and have learned a lot from you. Keep it up.
    Finally, to those who comment on your (and others') videos with lines like "I have a project due Monday, how can I do..." These drive me mad, as it seems they want YOU to do the work and let tham take credit for it to get their diploma/degree. Instead, I recommend those people actually invest in LEARNING something, instead of poaching others' work. Grrrr...

    • @citratune7830
      @citratune7830 7 месяцев назад

      Hi Tim,
      Have you heard of PID control? Theres a video on MATLAB that allows you to use this output speed to determine how to adjust it.
      Also, about a foot is close enough to 10 inches. I think he rounded it.

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

    Can we show a sample wiring for 24V power supply to drive the 2 24V DC motors, assuming 9V power supply from battery to power Arduino to include a breadboard.
    in short a circuit connection using L298n Motor Driver, Arduino board, Breadboard.

  • @d3bbi339
    @d3bbi339 6 лет назад +1

    You should make a video on building a drone with a camera attached. Just a thought! You just explain things so well it would make things so much easier for my brain to crunch on.

  • @carlosl1895
    @carlosl1895 3 года назад +1

    I’m starting with arduino. Still don’t know how to program it. Thank you for such a great explanation. To me is the best video I have seen. Keep up with it

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

    Does anyone know if you can also use the l293d motor shield driver instead of the l298n. What needs to be adjusted if you use it (if it is possible)?

  • @rhjiv4
    @rhjiv4 6 лет назад +1

    Great tutorial - one of the best I have ever seen. In it you show a picture of several opto interruptors. The third one (on the right) looks like an ITR9606. Can you recommend this one or not? Are there others that you would recommend more highly?

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

    40:55.... > is greater than, < is less than...

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

    Hello Sir,
    I want to use arduino to control the speed of two Maxon motor (EC) at very high speed precisely. Could you please help me to select the best arduino MKR board for this application.

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

    does this link is the exact LM393 Speed Sensors you use in your video ? if not, could you give me a link so i can buy some?
    www.amazon.ca/gp/product/B0183KF9HW/ref=ox_sc_act_title_1?smid=A1UO2CSKOWQ5H6&psc=1
    really appreciate your videos, Olivier

  • @joerinaldi5
    @joerinaldi5 5 лет назад +1

    Excellent Presentation. Clearly explained with complete details of project without any missing steps. Very easy to follow...thanks

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

    HI there,
    i want to build a AGV (Auto Guided Vehicle) robot. but i need help wiring the circuit. i'm using two DC motors to drive the robot forward, two battery packs to power each motor, one Dpdt switch to turn the robot off and on, and two limits switches that will act like sensors. if one limit switch is trigger one motor stop and the other motor reverse until the switch is release. can you guys help me out with this projects? thanks!

  • @christosmal4653
    @christosmal4653 5 месяцев назад

    Hi Bill . Could u mabe give me some guidelines to combine this project with ultrasonic sensor. I have try doing it but some how get stuck in code.

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

    Your videos are awesome!!really helpful

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

    love your channel

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

    Hi sir this is excellent

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

      But I want ( vehicle smoke detecting and speed sensing system) mini project

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

    while(steps > counter_A && steps > counter_B). Steps is not less than but is greater than counter_A etc...

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

      That's right, logically consistent though :-)

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

      Shouldn't the || operator be used instead of the &&? If I understand the code correctly, as soon as one motor reaches the given step count, the loop will exit and both motors will be switched off.

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

    Fantastic video. Thank you very much 😊 ☺️

  • @seasmurf1878
    @seasmurf1878 6 лет назад +1

    Thank you Sir for you instruction videos.
    Great RUclips Channel, one of my favourites.
    My name is Anton Vandersteen.
    I live in Eindhoven, The Netherlands. Eindhoven, the city where Philips started its first factory making lamps.
    I have found a great book on the internet with the title 'Android Robot Bonanza' . This book is written by Gordon McComb.. 416 pages of pure delight about robotics!!!
    Maybe you could do some instruction video from this book??
    Regards,
    Anton Vandersteen
    Eindhoven, The Netherlands

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

      Philips was my favorite bulb manufacturer. I am in the USA and I was using their bulbs in the1980's. Motorcycle and automobile lighting. The Best!! Thank You, Anton!!

  • @housseinbenabdelhamid203
    @housseinbenabdelhamid203 6 лет назад +1

    can you explain to us what a line follower PID control is ?

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

    can't you use l298n to power the Arduino through the 5v on the driver?

  • @preetamsingh147
    @preetamsingh147 3 года назад +1

    You really are a hardworking man. Keep it up!

  • @123kkambiz
    @123kkambiz 6 лет назад +1

    Your tutorials are excellent.Thank you very much for uploading the video with excellent camera positioning and video editing.

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

    I was wondering. If you would you would want to make a PID temperature controller that for example kept a room a 85F during the day and 70F during the night. Could you use the PID library and a real time clock to achive that using interrupts to toggle between the different settings?

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

      rimmersbryggeri smart

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

      @@xen0n_ML Maybe but I have no isea how to do it. Any time I modify a PID sketch It just returns soemthign like. (not possible to compile for this board)

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

    Thank you my dear for your clear and complyt lesson may god help you wish you all the best

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

    Hi Mr,
    i used the same code And montage, to measure my motors speed,
    void loop()
    {
    moveForward(255, 255);
    delay(10000);
    moveForward(200, 200);
    delay(10000);
    moveForward(150, 150);
    delay(10000);
    }
    my left motor work on all PWM value given, but my right motor, work only when i give a full pwm value moveForward(255, 255);
    i write a post in Arduino forum : forum.arduino.cc/index.php?topic=599332.0
    and till now there is any explanation
    can you help ?

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

    CMtoSteps function is not working properly any idea ?

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

    Great video, but with a serious drawback.
    That "ISR_timerone" is a VERY GOOD EXAMPLE HOW NOT TO DO IT. Its neither short or fast.
    The correct way would be to just copy the counters to another pair of variables, reset them and set a boolean flag.
    The "loop" code would check for the flag to be true, then do the maths, print the result and reset the flag
    Also the explanation for the "volatile" qualifier is incorrect.
    Don't get me wrong, I like your videos and learned a lot with them, but this ISR its a huge mistake and a very bad example for the noobs out there.

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

    Hi, I'm using ESP32 board and the TimerOne libraby is not compatible for the ESP32. Which library should I use instead?