I'm a beginner in coding and need some help ! :)


#1

I want to build an arduino that can control the movement of 4 servo motors and one ultrasonic sensor …__
two servo motors moves until the ultrasonic sensor can detect an object then its stop moving and the other two can start moving for some time then it stops and let the initial 2 servo motors to start working again … If you can help me then ill be very greatful and thank you all :slight_smile: .


#2

Share your circuito circuit with us and we’ll be able to help I’m sure.


#3

I made something very similar to this. I made a car with an ultrasonic sensor on it. Basically if the car is within a certain proximity from any given object, it moves to the left. Very simple but I can understand the hardship that you may face. Its a very fun project and I’d love to help you with it. Let me know what you finished so far and I’ll guide you through the rest.


#4

thank you for your supports , this is my idea of the project but im not very good with the coding and Im not sure if i even did the connections right …


#5

so my idea is to make servo 5 and 4 movs together for 360 degree rotation untill the ultrasonic sensor can detect an object on about 35 cm distance then those two will stop , and the other three will start working for 35 degrees each and stop , then it goes back to its initial location , and back again for the 4&5 servos to start working again


#6

well, I noticed that you did not power your ultrasonic sensor. Is that a glitch. Also, there is this program you can download that is really user friendly for making schematics. The program is called Fritzing. It’s really great. Personally, I think its better than the one you’re using.


#7

You can also use the Circuito app which comes in handy if you want to order the parts you used in the simulation.


#8

my main problem is the coding and doing the simulation making sure that it is on the right track


#9

well, other than what I already pointed out, you’re connections seem to be correct. If you share the code I’ll be able to proofread it for you and add my input on it. Do you have code already set up?


#10

until now I don’t have any experience regarding coding … so i don’t have any code to start with …
that is what i was asking for ,if you can help me with that if not , then its okay this was an on going experience for me , thank you .


#11

Well if you’d like, I came across this great teacher on YouTube. He’s different from the rest because he doesn’t explain things expecting you to have experience with coding. He explains things as simple and easy as possible.