Hey guys!
I was wondering if anyone would be willing to help me with a project of mine. I am doing a physics essay related to cars, so I am using this remote control car for my experiment to simulate real-life. I have assembled the whole car and have and Arduino UNO to pre-program a set route that it will repeat in every run-through. It is not a hard route at all it just needs to go forward and then turn right as its going forward, then go forward again and then stop. It needs to be able to do this slowly and at max speed.
You can see what the car looks like in the image below. I have a servo with three entry points for a jumper and a "fahrtregler" (see picture below) with three entry points. I grounded both of them to the arduino ground slots and I linked the servo and "fahrtregler" so that the servo gets power that way. Then for the signal I put the jumpers into 2 random slots, which won't really matter where they go. I can change the slots they are in depending on the code.
Direction is controlled by a servo and speed by the motor. The motor works through the "fahrtregler" (not sure of the exact english term) which is connected to the arduino. The servo is also connected to the arduino. The servo is powered through power provided by a Lipo battery which runs through the fahrtregler. It has no sensors, because it doesn't need to pick anything up and then react on that. It simply needs to follow steps that are loaded onto the arduino (which is what needs to be written). So the servo needs to be controlled and the motor needs to be controlled. The servo must be controlled to go left. The motor only needs to go forward. I think it would work best to have to seperate files of code, that are essentially the same, but one is at max speed and the other is at a low speed. The servo must turn left 60° physically. I'm not sure if this helps in the coding but this is what needs to happen physically, so let me know what you need here. For the motors what would you need to know? It would go forward for the entire run, then the servo engages after 5 seconds and stays on for 1 second. Then the car continues going straight, before stopping after another 3 seconds.
It does not need to follow a a specific course so it has no sensors. The servo will need to physically turn 45°. I understand that at the second speed the turn will be different if the servo movement remains the same. Could anyone write code for this?