Could someone give me a code for this project.I would stick the distance sensor on the servo so the distance sensor will keep turning from left to right to detect stuff.
When someone gives me the code I will connect everything as said in the code(Like which pins the parts are connected to etc).
Being a beginner doesn't prevent you from learning anything.
Arduino isn't a plug and play toy, it is easy but it does have a learning curve.
If you want something you can build a robot with without learning how to code it, Arduino isn't the platform you're looking for.
Thanks everyone I did a little bit of research and
And then do a whole lot of research and learning and experimenting and trial and error, and eventually, you'll figure it out on your own, and it will feel great and you will understand exactly what the robot is doing, and why.