You've taught me so much about Arduino. Thank you so much for your videos.
@paulmcwhorter2 жыл бұрын
Wow, thank you so much! Really appreciate the support. Hey, this IMU series is probably my favorite series I have done, but pretty much not watched by most people. Glad someone did it and learned from it.
@cruizn2 жыл бұрын
@@paulmcwhorter My pleasure; I should have done it sooner. I've learned most of what I know about Arduino from you, and I appreciate the huge commitment and effort you put into your content. I came upon this series looking to build a stabilized platform to mount a Starlink on a friend's boat, so I'll also need to include yaw in the sketch. Wish me luck 😉
@carlforsell44632 жыл бұрын
Greetings Paul Just wanted to let you know that I have watched all of the videos in this series. (Some more than once -#21). You are blessed with the skill of simplifying the complex. Few presenters do this as well as you. I have also watched most of the cad videos, oh heck... I've watched MANY of your videos. 95% of them I have watched start to finish. I have 30+ years IT experience, but I have learned something from every video. God bless you and yours. Carl
@rbonari5 жыл бұрын
Hello Paul, This was a great lesson on PID Control in an actual real life application !!!! Your expertise in all things algebra and calculus makes you the perfect person to teach this subject and you did a masterful job. Your mastery of arduino and math can not be beat on the internet and you explain these difficult subjects in a manner that we can all understand !!!!! Again, great job !!!!! I do hope this series continues on and maybe a self balancing robot is in the future !!!!! You are again, the very best on youtube !!!!!!!!!!! Rick
@karim1119 ай бұрын
This IMU course really complements most of what i need to progress in my projects! Thank you Paul!
@paulmcwhorter9 ай бұрын
Thanks! Really appreciate the kind words and the support.
@dcpowered4 жыл бұрын
Please make more PID project videos!! This is the stuff that we want to see!!
@varunahlawat9013 Жыл бұрын
This was by far THE BEST PID lecture I've seen on entire KZbin! If I were to pin point what makes Paul a GREAT TEACHER is that teachers should always, always build the topics, that they're teaching, "From Scratch" You do exactly that.
@akeemshepherd4783 жыл бұрын
This is literally the best PID video I've ever watched. Very lucid from the beginning and I love that. If I could double like I would. Brilliant!
@EdwardPie3 жыл бұрын
Sir, you take seemingly complex topics and you break them down in plain language such that anyone can understand. You are a gift and I appreciate your contributions to knowledge.
@itsabuscus16194 жыл бұрын
It's stuff like this that has my jaw on the floor. Wonderful explanation, sir!
@mumbaiverve2307 Жыл бұрын
Ditto !
@paulhoshovsky877 Жыл бұрын
Thanks for the thorough presentations. You requested feedback in Lesson 26 for my configuration. I used the MPU6050 with the DMP and two HITEC HS-325HB servos. The values are K1=0.4,=, k2=30 and K3=0. These values provided a reasonable response. I discovered that using a time delay of 50 ms was the fastest time for the UNO and the MPU6050. And yes, as you said, it would be nice to rapidly converge to a stable response. It took me some time. I discovered that my PITCH error function had to be subtracted (rather than added) to the servo value. This is due to to my geometry. Thanks!
@timothedecroux41463 жыл бұрын
Hi Paul ! I went through the 26 videos, incredible job ! My plateform works very well with the coefficent you gave. Thank you very much for sharing your expertise. Looking forward to watching new series of your tutorials. Big support from France.
@amosfalcon61902 жыл бұрын
It's the best series of lessons I ever learned with coding in practice, especially is your great sharing with PID ! Hope you have the lucky with your kindness. Big thanks for your teaching with intelligent experience, Professor McWhoter.
@adityaagarwal6363 жыл бұрын
I watched the whole video! I actually found written PID controller on every second arduino video, so I wanted to know what it actually is. I searched and found YOUR video when scrolled down a little bit, and I was relieved to see that. Thanks for your spectacular videos, hope I can learn from you as your student in future. Thanks again, Love from India.
@paulmcwhorter3 жыл бұрын
That's awesome!
@adityaagarwal6363 жыл бұрын
@@paulmcwhorter Thanks sir, You reply means a lot to me☺☺
@lotbotrobotics50263 жыл бұрын
Watched all 26 lessons and learnt a lot. This PID lesson has been very beneficial as drone configuration include a PID setup and I really did not understand its affects on a drone and this lesson has been very beneficial. This real world application was also very beneficial and again I want to thank you for your efforts in making these courses.
@automateyourhouse4 жыл бұрын
Absolutely amazing detail in this series Paul, BRILLIANT, and so interesting, thanks so much for creating and posting.
@arnoldschmucker99774 жыл бұрын
I feel that I understand PID for the first time as a result of this video. Thank you for explaining it Mr. McWhorter.
@kevinshaver56134 жыл бұрын
Paul, I have really enjoyed this entire series! I actually understand most of what you have taught (quaternion numbers are hard ). I really enjoyed this long series , hopefully you'll have more .Thank you.
@teamdrona66713 жыл бұрын
I have gone through the whole course, and a huge respect to the teacher for providing such kind of gold for free. Just love you sir..... And one thing, I am ready with a huge mug of ice cold coffee. 😀😀
@paulmcwhorter3 жыл бұрын
Excellent!
@maximem.11175 жыл бұрын
Excellent course, i never really understood what integrals were useful for in 5 years of engineering school and in 2mins you made me understand. Thanks and please continue this great series
@إبراهيمالهلالي-ش7ش Жыл бұрын
as someone studied control theory i like how the video presents the PID in a very beautiful and easy to grasp way
@zaqk23 жыл бұрын
Thanks
@paulmcwhorter3 жыл бұрын
WOW, Thanks! That is a huge encouragement.
@zaqk23 жыл бұрын
@@paulmcwhorter I just finished this series of lessons... The last lesson totally cleared the concept of PID control... Thanks a ton Paul
@Sam-dv3vt3 жыл бұрын
I am crying out of happiness, thanks a lot Paul
@Aliguibrisa393 Жыл бұрын
thank you. I have watched all the 26 lessons. again, thank you for all your expertise.
@rogernunn1 Жыл бұрын
Hi Paul, I went through the lessons on the self-levelling platform. It was informative and helped me to remember the maths that I haven't seen for years. I created a model vehicle (tractor) with meccano and arduino, I then used the roll correction component to ensure that it stays level whatever the terrain. Thank you for the video series.
@paulmcwhorter Жыл бұрын
Great job!
@danbergquist57294 жыл бұрын
Hello Mr. McWhorter, I really enjoyed this series of lessons and I am now off to start the Jetson NANO lessons. I can't wait to get started. Best wishes.
@lotbotrobotics50263 жыл бұрын
Thanks!
@paulmcwhorter3 жыл бұрын
WOW, thanks so much. Really appreciate the encouragement.
@dorianeric5 жыл бұрын
really enjoyed the video, it's maybe a bit slow but it kinda works in its favor, you made it very understandable and you don't need to be 100% concentrated to understand the idea, thank you for helping the maker community and making excellent quality videos
@Kelvincars_gh2 жыл бұрын
Hello Mr. Paul, this lesson is really working great. I always enjoy your channel please stay strong and provide us with you great teachings. Am Kelvin Cruickshank from Ghana. All the best sir! 👍
@qzorn4440 Жыл бұрын
A most excellent PID Arduino math and programming lesson. The PID calculus is a great learning tool for real world examples. 🐬 Thank you. A very fascinating subject, Past, Present and Future Trends in the Implementation of PID Control Algorithms. I need to do all these 9-Axis lessons to compliment the RPi Pico lessons.
@michaelbishton94394 жыл бұрын
A bunch of this is over my head, but you provided enough information for me to understand it after I hear this a couple of times. Thank you very much. If I understood this series, you described two sets outputs. 1. How to use the various sensors as counter-influences to each other so that you can counter sensor drift and get much better results for staying on course or more accurately measure a chance. 2. How to use the sensor outputs to drive and tweek the calculations that drive the servos. I would appreciate knowing what I missed, if this summary missed the boat. Thanks again
@BiancaDianaT4 жыл бұрын
This was an awesome series
@klaus61784 жыл бұрын
These videos are great! I downloaded all 26 lesson's learning lots, your awesome!
@andruwilliams8414 жыл бұрын
Great series! Followed every step, coded and built the project. This was somewhere between watching art and playing chess. Thank you! On lesson 26 I quickly stripped out horn and need the better metal servo gear to attach to metal horn on bracket. I lowered k1 and k2 to keep second from striping out.
@vahidhemmati513 жыл бұрын
Thanks for sharing your experience and knowledge, I personally learned a lot just by watching
@elainedunkerley98035 жыл бұрын
Paul, excellent work thank you. I like the way you develop the project from first principles with the engineering and maths into a coherent application.
@skfalpink1233 жыл бұрын
Many thanks for the fantastic explanation of EXACTLY what PID actually is and does!
@darklightining64122 жыл бұрын
Thanks, I this is my first time to understand PID controller practically. (I watched it all )
@Bhanuprakash-xl6ti3 жыл бұрын
Initially the concept of PID was all too complex for me to comprehend or even to start working on. Your Brilliant video gave me all the 100s of hours of understanding I can get by reading... Thanks a lot to also combine Theory with Aurdino! lot of stuff on KZbin miss practicality aspect. Your video is TERRIFIC!!! THANKS A TOONE
@paulmcwhorter3 жыл бұрын
Great to hear!
@raymondmichael49875 жыл бұрын
I see you with all the notifications, I appreciate it and admire you work, I will join as soon as I complete my website development at moment, but today I had to this wonderful episode. Greetings from Tanzania 🇹🇿
@paulmcwhorter5 жыл бұрын
Wonderful that we have a student in Tanzania. I was there one time, just just as a stop on my way to Kenya. Would love to visit again one day. It is a beautiful country with wonderful people.
@raymondmichael49875 жыл бұрын
Paul McWhorter, yes one time you said that sir, I'm your fan since I saw your old arduino Playlist, and you made me build my simple incubator using arduino. Please, don't hesitate to visit my country, sooo much to see here prenty of attraction. I reside in Bagamoyo (a historical place, if you're into history too)😉. Keeep the good work sir, hopefully one day I can learn Raspberry Pi from you too. Greetings from Tanzania 🇹🇿 🙋🏾♂️
@wayneswan30923 жыл бұрын
I would love to see more on PID control! I can see how we can use this exact system to make a self balancing 2 wheel robot, and then use a PS3 controller and program Potentiometer offset to set the center of balance off to move it forward and backwards. I'm thinking I might take my Car apart from the "Intro to robotics" lessons I followed you on and building a self balancing 2 wheel robot! And set it up to run on a PS3 controller! its got everything I need including blutooth.
@vaibhavbarde21144 жыл бұрын
Quality education in free.
@jabcek3 жыл бұрын
I wish that this series would have continue... I was learning this in my school 13years ago, and didnt understand anything (I admit that i wasnt really also interested). Now this is my hobby... Really like your graphical explanations. Keep up the good job ;) Went thrue the lessions without BNO055 (just couldnt wait 1 month till it gets here). Will go thrue some of the lessions again with my BNO055, when it comes :)
@maheshjawahar4 жыл бұрын
Boom!! Made it till the end !! Thank you so much for the wonderful series.. you are the " most excellent" teacher !! God bless you!
@steveholt89912 ай бұрын
Great series Paul, thank you again.
@marinehm5 жыл бұрын
This was an excellent explanation of pid control.
@rbonari5 жыл бұрын
Hi Paul, Yes, I am following your great jetson nano and your new arduino series. They are absolutely the best tutorials ever as is your 9 axis imu tutorial !!!! One possible continuation lesson would be to show how to do a compensated compass showing the results using vpython to show a graphic of heading (north, east, south, west). I think this would be a popular lesson or two. You do awesome, great work and the math and the way you teach it is by far the best I have ever seen anywhere !!!! Take care and GOD bless !!!!! Rick
@MetalRobotics3 жыл бұрын
great explaination sir. Respect from India!!!
@unknownswords48724 ай бұрын
Paul sir first of all . sir great grand salute to you. sir you provide me a vision to work on any engineering project and also in the real life problems .🙏🙏🙏 i thank to you sir from all the grounds of gratitude and respect 😊
@shadiedalati36622 жыл бұрын
As always amazing explanation of error correction.
@ECE_Engineering5 жыл бұрын
Hi Mr. Paul. I always like your presentation and as always it was one of the most excellent tech video. I enjoyed watching it and I have watched it till the end. Also, I would like to make a suggestion that if you could add potentiometer to set constants for each PID controller, in fact it would be a good way to incorporate your lesson 10 on it.
@robertjohnson40893 жыл бұрын
Paul this was great I now understand how to program a PID in a system thank you now we need to figure out how to do it in the stm32
@AliChallenger3 жыл бұрын
Hello Mr. McWhorter, such another fantastic tutorial of yours. I have learned a lot from your fruitful tutorials. Based on my understanding, my personal experiments and as I saw in the first of this tutorial that the system need to be leveled first then you re-start it and it start to re-level/correct itself, otherwise it would lost its balance condition. I believe that issue is because while the MCU and hence the PID equations is running first so it is already calculating the error and the correction value which is the (rollServoVal), but the actuators are off so the error is still there and accumulating till very very large quantity in either - or + direction. Then when we turn the actuators on then the system will start misbehave due to the accumulated error correction value. So, I have solved this issue by adding the following simple conditions: if(rollServoVal< 0) rollServoVal= 0; else if(rollServoVal> 255) rollServoVal= 255; This has helped me to limit the corrections values according to the minimum and the maximum values. However, I am stand to be corrected if I miss something and many thanks again for this fantastic tutorial.
@MartinBgelund2 жыл бұрын
Very well explained! Thank you very much, sir!
@augmentdcoconut Жыл бұрын
bookmark 23:53 for study purposes
@mikemccartneyable4 жыл бұрын
That was amazingly well explained and demonstrated.
@hc87143 жыл бұрын
hope you return this series about Integral clamping and more optimizing aspect related to operation introduced instability. Thanks!
@pepper6695 жыл бұрын
Many thanks for explaining it to me in a way I can understand!
@abdelhassibdad34134 жыл бұрын
Best teacher as always
@j1952d3 жыл бұрын
Why K1, K2 and K3 and not Kp, Kd and Ki ? The latter would be easier to associate with the respective calculations, IMHO.
@billfield83004 жыл бұрын
WOW !! I think I finally got it. The practical application of the PID is head and shoulders above any other explanations I have seen previously. Not doing the mechanical with you but i assume we will be doing something similar with our AI lessons. (Im still on ROI lesson there). I really appreciate the effort you make to help us understand some of these more complex concepts. Great Lesson! Thanks.
@abnerverdoquillo3 жыл бұрын
We call this guy a "MASTER"
@peterwooldridge72855 жыл бұрын
Nice one P....watched til the end. The post here re the Pots for adjustment is interesting....Stay well buddy and thanks
@PriyanshuPareek4 жыл бұрын
Loved this series, thanks a lot!
@chrisbrachot2637 Жыл бұрын
Brilliant video and videos in general. Your the best source of information I have in terms content type, detail and teaching style. I probably owe you a strong coffee or two at this stage. Thanks. On another note.... I wonder if the cables being connected causes additional difficulty in tuning the systems parameters. I think those constants are intended to act as a substitute for a mathematical model of the platform and ancillaries plus the wires. Perhaps the wires add an element of choas i.e the system itself is constantly changing not just the error. Tracing the wires closer to the pivot point of the platform may help??
@zmedford15 жыл бұрын
Thank you for your excellent teaching. I have used your series on the BNO055 to begin to develop my own system that is somewhat different from the examples you provide. I am trying to figure out how you have gotten the information on the use of the BNO055 that you have--can you share how you have learned it? In particular, I'm trying to understand how to set the operating modes and how to save and write calibration parameters. But I'm not good enough at reading the library file to figure it out.
@YatendraSaraswat2 жыл бұрын
Thank you Sir, This was very informative & helpful
@paulmcwhorter2 жыл бұрын
Glad it was helpful!
@nobodyeverybody84372 жыл бұрын
Sir, thank you for your tutorial. I would like to know whether you have/will make any tutorials about filtering methods for position and orientation estimation such as Extended Kalman Filter and etc.? And whether you could describe in your channel how to use the Infos provided in the specification of each IMU to correct employ such filtering methods?
@mumbaiverve2307 Жыл бұрын
Hello Paul. Great explanation and more importantly very well explained implementation in code. Just a quick query, how to decide the sampling rate of the PID? What I mean is, how to decide if a uC is fast enough for a particular PID implemantation.
@rashmikp6124 жыл бұрын
Absolutely amazing! After learning this course I tried to implement this knowledge in building a diy cubli but I couldn't figure out a way to relate the pid values to the pwm inputs to the DC motors. It would be great if you could help me out in understanding that relation. Thank you so much for your amazing courses!
@moah85933 жыл бұрын
Same problem I have Have you got anyway to deal with such motors? Please! Let me know because I gotta get my project done in few weeks
@ashikislam2327 ай бұрын
Hello Paul , I'm planning on making a similar system that can keep a ball centered in the presence of disturbances. Thank you for making such a detailed video on PID! The contents of this video will be really helpful for me. However, I'm wondering if Ziegler-Nichols method could be used here to find the K1, K2, and K3 values a bit more faster and systematically. I can't quite figure out how to (repeatedly) simulate a unit step with this system that you have. Is this considered digital control? Or a digital implementation of PID?
@sashamuller97434 жыл бұрын
absolutely amazing series thank you thank you thank you!!
@hc87143 жыл бұрын
just want to let you know, I do not have all these component, so I used the same concept to work on a oven instead. All good. I learned PID!
@paulmcwhorter3 жыл бұрын
Nice work!
@robcameron69955 жыл бұрын
Hi Paul. Watched to the end 😇. I don’t understand why you alter more than one parameter at a time whilst tuning the system. Nice project keep it up.
@liridonosmani58344 жыл бұрын
Thank you Paul.
@moah85933 жыл бұрын
Can I make that pid calculating method general for any different systems? Is it possible? All in all, appreciated.
@rbonari4 жыл бұрын
Hello Paul, I was curious about the temp values reported by the bno055 imu sensor. After looking at the data sheet for the sensor it appears that the temperature being reported is the gyro or accelerometer temps depending on selection of the gyros or accelerometers in the temp register. This would make sense because on this sensor you would be more concerned about the temps of the gyros and accelerometers rather than the surrounding ambient temperature. This also explains the elevated temps compared to the surrounding ambient temperature. There are many other sensors that we can get the ambient temp if we need it for whatever reason. Also one can select between degrees C and degrees F by manipulating the temp register however this is an easy conversion via software.
@samirkrireche1254 жыл бұрын
Really nice, thank you, by the way, is there a method to calculate the best PID parameters for these, like the ziegler nichols method or somthing else ?
@vaughanrocketry8633 жыл бұрын
This is great Paul! Im working on a project where I need to mount the IMU in the vertical position how does this change things?
@megauti Жыл бұрын
You are the greatest!!!
@Adi-lv9bo5 жыл бұрын
Nice project, will be more smooth and fast with brushless motor or that is arduino/sensor limit? I ask for a camera stability project.
@CollinBaillie3 жыл бұрын
I don't see that brushed/brushless would make a different. Paul is using servos, but maybe a stepper motor would be more suited to your purpose?
@meshumi14 жыл бұрын
Love your videos
@kubilayakbulut53024 жыл бұрын
beton yetmez be reyiz adamsın
@bushraamer92514 жыл бұрын
HI Paul , Thank you so much for the wonderful series. I am doing project( 6 dof self balanced platform )can I use this code and wiring to do my project? how many dof in this project?
@MalcolmHelicopter4 жыл бұрын
Brilliant - thank you!
@zesegatto10 ай бұрын
49:39 - Please, use "Find and Replace" on a selected code chunk, guys. It will save you a lot of time. Probably he knows that trick, but choose to be moore didactic.
@kouider764 жыл бұрын
Hello Paul, thank you so much for all the excellent tutorials you are making especially the one regarding Control implementation. if it is possible could you make a video on how to set up an LQR control using Arduino or pi
@BryantAnderson-p8x9 ай бұрын
Power plants typically use PI (no D); manual tune is usually a Notch tune where P and I are increased incrementally until oscillation occurs then backed off until oscillations cease plus a little more since both P and I increase the overall loop gain. I is necessary to run with no offset from setpoint; D is usually unstable for a large/fast process upset and therefore not used. An ideal quarter-damped response to PID control is unnecessary if stability is lost.
@Jules-ki9nx5 жыл бұрын
What do you think of the new BNO080? Any chance you’ll try implementing it into a project? It’s supposed to be a lot better then the BNO055.
@omargomaa87872 жыл бұрын
Hi sir, thank you for your work I'm really appreciate it, I have a question if I can use 6 DOF IMU sensor in this project or not ?
@paulmcwhorter2 жыл бұрын
No, you really are going to need the sensor I show in the lessons. Other ones will not give you the needed outputs.
@phanitsok23704 жыл бұрын
Thanks you so much i really like this video.
@saurabhsinghjat Жыл бұрын
The value of the area will keep increasing for infinite time if the error is in the same direction and the system does not overshoot. How do we solve it?
@nipunkulatunga41353 жыл бұрын
when calculating rollErrorArea, should it change as (rollErrorArea+rollErrorSlope*dt)??
@qck575944 жыл бұрын
Hello Paul, was that the last video in this series? It has been great. Thank you.
@paulmcwhorter4 жыл бұрын
Yes, the last one. You could always go check out the series on Artificial intelligence on the Jetson Nano.
@CockpitView4 жыл бұрын
Thank you for yet another teaching masterpiece. I hope the views will remain low so I can maintain this "privileged Elite" feeling. (Life is just unfair for the ones that haven't discovered your channel yet). Keep it up my dear.
@wnekuu4 жыл бұрын
Hello, if I may ask, what is the reason to using PID with servos? If those are coming to set value on their own and they won't overshot as they already have their own PIDs inside? I can understand with normal motors, with drones that need to vary motor output etc, but with servos?
@wnekuu4 жыл бұрын
at 56:30 they are overshooting - maybe because you try to control servos like normal motors while they are fully capable to get to correct position on their own?
@babushome23462 жыл бұрын
Thank you sir for your painstaking work. This PID algorithm may be utilized to control movement of a self navigating wheel robot over an area (to be specified). This is to request you to kindly elaborate. I am interested to get a feedback from you. Thanking you.
@zesegatto10 ай бұрын
Great video. Today I finally got PID control. Thank you very much! Is there a chance you are having noise problem from your IMU? Just learn (and you probably knows that, but your audience can enjoy this information on this comment) noise can inverts the differential signal. As diferential signal is responsible for vigorous response (on the begin of correction) and as a break (on the middle of a correction), seems me that this is the problem. Right?
@andrewferg87374 жыл бұрын
Great video!
@jml_534 жыл бұрын
Paul, Great video. I'm watching your Jetson Nano series and plan on following up with some of your other videos. I've previously built an arduino IMU with PID for a self balancing robot. I found the PID control to be difficult. You provide a great explanation here, so maybe I'll go take another look at that project and see if I can get it to tune better. I was surprised you used the same k values for both axes. You've got very different angular moments for each axis because of the rectangular shape of the dev board. You did get a reasonable tune with just one set, so that was probably best for keeping the video clear. It did seem as if the ringing was different in the two directions. What do you think? PID tuning can be very tricky and I never found a great resource for developing tuning strategies. I thought your explanation will help develop better strategies. I was also wondering if you've thought about leveraging the AI/ML capabilities of your two Jetson boards to build an auto - tuner for the PID? You've focused on using them for machine vision, which is probably what they are optimized for, but they'd probably also be great at a task like this. It might be interesting to see that running to control your pan/tilt alongside the face tracking and other cv apps you've implemented. Finally, the self balancing robot is a challenging project to build from first principles. That would be an interesting extension of this series or potentially a good future series for you to consider. Thanks, and keep making this great content.
@paulmcwhorter4 жыл бұрын
The other thing going into this is how tightly my fingers hold the unit, and how much my wrist and fingers become part of the system. A better test would be to more rigidly mount it instead of holding it. A perfectly tuned system could ring, if there is play in my fingers and wrist. Tuning these things is more of an art than a sceience.
@markhache67564 жыл бұрын
@@paulmcwhorter I was thinking the same thing about the momentum and the ringing imparted by your brain trying to stablize your hands. I too was thinking about building a heavy jig to act as a base for the servos. That would then allow you to minimize the movement that the servos would impart to the base. Also it could also allow you to better control the input to the system and to make them more repeatable. Repeatability of the inputs is imports when tuning the feedback constants. I also really like Joe Limber's suggestion of using a Jetson Nano and a neural network to tune the constants. Seems like a natural use of a Nano and Neural Networks.
@adilalsubhi39624 жыл бұрын
Hi Mr. Paul, Thank you very much for your excellent explanation , I really enjoy learning from your lessons you are great teacher. I have Two questions in this lesson if you do not mind please: 1. You have set Integral part as accumulating value in PID so you add the old "rollErrorArea" with new " rollError*dt" . my question : As we are actually adding it every time to the out put signal (rollServoVal) , , and in the same time adding the old output signal (rollServoVal) to the new "rollServoVal " why we still need to add "rollErrorArea" to new Integral error every loop ?? (I am little confused we might duplicating the Integral!!) , so Would it be OK if We just add it only once in each loop (I mean only adding it to the output)?? so the little change will be like the below code: rollErrorOld=rollError; rollError=rollTarget-rollActual; rollErrorChange=rollError-rollErrorOld; rollErrorSlope=rollErrorChange/dt; rollErrorArea= rollError*dt; rollServoVal=rollServoVal+k1*rollError+k2*rollErrorSlope+k3*rollErrorArea; 2. Is it OK if I just use "delay(100);" for sampling rate instead of " #define BNO055_SAMPLERATE_DELAY_MS (100)" ?? what is the different between them, or that just for us to learn how to use "define" function ? I hope my first Question is a bit clear to you sir. And Thank you very much again for the excellent and quality work you are doing, we are learning a lot from you , God Bless you .