Welcome to a code project that's been crafted with passion and precision by Wassim HEDFI in February 2022. Unveil the magic of robotics as we dive into the world of Line follower robots, where every line is followed meticulously.
This Arduino code is a gift to the world, devoid of copyright shackles. Feel free to wield it, mold it, and share it with fellow enthusiasts. Let's spread the knowledge far and wide, shall we?
Behold, our star of the show—a 2wd Robot armed with a formidable array of 7 IR sensors and the mystical power of PID Regulation. It's ready to dance along the lines, thanks to this ingenious code.
Now, let's put you in the driver's seat. To make this code perform its magic on your robot, you'll need to do a bit of fine-tuning. Head over to the "Constants for PID and Motors" section, and let the tweaking begin!
Start by setting 'motor1speed' and 'motor2speed' to your liking, and don't forget the 'OutputFactor.' Now, here's where the real fun begins. Begin with 'ki' and 'kd' at null, and sprinkle a small value (e.g., 0.01) onto 'kp'.Start increasing it and Watch in awe as your robot starts its line-following journey.
As you get mesmerized by the smooth dance of PID, it's time to bring 'ki' into the mix. Start small (e.g., 0.0001) and gradually increase it until you see that perfect PID ballet unfold. 'kd' is an optional guest at this party; it may not be everyone's cup of tea, so tread carefully. If you decide to invite it, let it join with a humble 0.001.
Keep in mind, these constants can be as elusive as a breeze, and they love to change depending on countless factors. Don't take my word for it; experiment and see for yourself. If you find yourself lost in the PID wilderness, consider consulting the sacred texts of PID Regulation documentation.
But wait, there's more! This code isn't just for the PID elite; it's also set up to cater to those who prefer the trusty 'if statements' route. Versatility is our middle name!
So, fellow explorer, embrace this code, venture into the world of robotics, and never cease the adventure. Remember, it's not just lines you'll be following; it's your curiosity that will guide you. Happy coding, and may your robot's journey be as thrilling as me.