4wd car kit

So I bought at a flee market this arduino smart car. it was working ok but then I de-asseble it to bring it home and I can't find online the manual. I am sure the wiring was different when I bought it but I can't figure out what was the original setup. I would appreciate help to make it work again and more importantly an explanation on why is not working right now. Looking forward to learn!

A picture before you disassembled it would have helped on the re-assembly.
But we are too late for that.
If we had access to the code that was installed, we could probably figure out which pins needed to go where.
At this point, unless you can find a link to where this same car and code is available on the internet, I think the best course is to write new code, assigning the pins to do what they need to do for the motor driver you have.

Do you feel like coding?

Absolutely! I love to code! that's why I am using arduino!

The sketch that I am currently using is:

int pinI1 = 4 ;/* define interfaces I1 */



int pinI2 = 5 ;/* define I2 interfaces  */ 



 int speedpin = 2 ;/*define EA (PWM control) Interface */ 



 int pinI3 = 7 ;/*define I3 Interface */  



 int pinI4 = 8 ;/*define I4 Interface */  



 int speedpin1 = 10 ;/*define EB (PWM control) Interface  */ 



 void setup () 



 { 



 pinMode (pinI1, OUTPUT); 



 pinMode (pinI2, OUTPUT); 



 pinMode (speedpin, OUTPUT); 



 pinMode (pinI3, OUTPUT); 



 pinMode (pinI4, OUTPUT); 



 pinMode (speedpin1, OUTPUT); 



 } 



 void loop () 



 { 



 /*Straight */  



 analogWrite (speedpin, 100) ;/*set the speed of the input analog
value */  



 analogWrite (speedpin1, 100); 



 digitalWrite (pinI4, LOW) ;/*make DC motor (right) turn counterclockwise
*/  



 digitalWrite (pinI3, HIGH); 



 digitalWrite (pinI1, LOW) ;/*make DC motor (left) clockwise  */ 



 digitalWrite (pinI2, HIGH); 



 delay (2000); 



 /*Black*/ 



 analogWrite (speedpin, 100) ;/*set the speed of the input analog
value */  



 analogWrite (speedpin1, 100); 



 digitalWrite (pinI4, HIGH) ;/*make DC motor (right) clockwise
*/  



 digitalWrite (pinI3, LOW); 



 digitalWrite (pinI1, HIGH) ;/*make DC motor (left) turn
counterclockwise */  



 digitalWrite (pinI2, LOW); 



 delay (2000); 



 /*Left*/ 



 analogWrite (speedpin, 60) ;/*set the speed of the input analog value
*/  



 analogWrite (speedpin1, 60); 



 digitalWrite (pinI4, LOW) ;/*make DC motor (right) turn counterclockwise
*/  



 digitalWrite (pinI3, HIGH); 



 digitalWrite (pinI1, HIGH) ;/*make DC motor (left) turn
counterclockwise */  



 digitalWrite (pinI2, LOW); 



 delay (2000); 



 /*Right*/ 



 analogWrite (speedpin, 60) ;/*set the speed of the input analog
value*/ 



 analogWrite (speedpin1, 60); 



 digitalWrite (pinI4, HIGH) ;/*make DC motor (right) clockwise */



digitalWrite (pinI3, LOW); 



 digitalWrite (pinI1, LOW) ;/*make DC motor (left) clockwise */



digitalWrite (pinI2, HIGH); 



 delay (2000); 



 /*Brake*/ 



 digitalWrite (pinI4, HIGH) ;/*make DC motor (right) brake */



digitalWrite (pinI3, HIGH); 



 digitalWrite (pinI1, HIGH) ;/*make DC motor (left) brake */



digitalWrite (pinI2, HIGH); 



 delay (2000); 



 }

Why

are

you

skipping

lines?

If you take out the excessive white space, it is much easier to read.
Here is your code, formatted with CTRL-T and most blank lines removed.

int pinI1 = 4 ;/* define interfaces I1 */
int pinI2 = 5 ;/* define I2 interfaces  */
int speedpin = 2 ;/*define EA (PWM control) Interface */
int pinI3 = 7 ;/*define I3 Interface */
int pinI4 = 8 ;/*define I4 Interface */
int speedpin1 = 10 ;/*define EB (PWM control) Interface  */

void setup ()
{
  pinMode (pinI1, OUTPUT);
  pinMode (pinI2, OUTPUT);
  pinMode (speedpin, OUTPUT);
  pinMode (pinI3, OUTPUT);
  pinMode (pinI4, OUTPUT);
  pinMode (speedpin1, OUTPUT);
}

void loop ()
{
  /*Straight */
  analogWrite (speedpin, 100) ;/*set the speed of the input analog
  value */
  analogWrite (speedpin1, 100);
  digitalWrite (pinI4, LOW) ;/*make DC motor (right) turn counterclockwise
*/
  digitalWrite (pinI3, HIGH);
  digitalWrite (pinI1, LOW) ;/*make DC motor (left) clockwise  */
  digitalWrite (pinI2, HIGH);
  delay (2000);
  
  /*Black*/
  analogWrite (speedpin, 100) ;/*set the speed of the input analog
  value */
  analogWrite (speedpin1, 100);
  digitalWrite (pinI4, HIGH) ;/*make DC motor (right) clockwise
*/
  digitalWrite (pinI3, LOW);
  digitalWrite (pinI1, HIGH) ;/*make DC motor (left) turn
  counterclockwise */
  digitalWrite (pinI2, LOW);
  delay (2000);
  
  /*Left*/
  analogWrite (speedpin, 60) ;/*set the speed of the input analog value
*/
  analogWrite (speedpin1, 60);
  digitalWrite (pinI4, LOW) ;/*make DC motor (right) turn counterclockwise
*/
  digitalWrite (pinI3, HIGH);
  digitalWrite (pinI1, HIGH) ;/*make DC motor (left) turn
  counterclockwise */
  digitalWrite (pinI2, LOW);
  delay (2000);
  
  /*Right*/
  analogWrite (speedpin, 60) ;/*set the speed of the input analog
  value*/
  analogWrite (speedpin1, 60);
  digitalWrite (pinI4, HIGH) ;/*make DC motor (right) clockwise */
  digitalWrite (pinI3, LOW);
  digitalWrite (pinI1, LOW) ;/*make DC motor (left) clockwise */
  digitalWrite (pinI2, HIGH);
  delay (2000);
  
  /*Brake*/
  digitalWrite (pinI4, HIGH) ;/*make DC motor (right) brake */
  digitalWrite (pinI3, HIGH);
  digitalWrite (pinI1, HIGH) ;/*make DC motor (left) brake */
  digitalWrite (pinI2, HIGH);
  delay (2000);
}

Now, you have a sketch. Did you push it to your arduino? Did it do what you wanted?

Ah! Apologies, was using my phone and I haven't realized that the spacing was off :confused:

Yes, I pushed the sketch (found on Internet on a similar project) and nothing happens... I assume that with the batteries on and pressing the button on the shield should make the wheels spin. I have also checked the motors cables and the battery wiring and everything is right. I think that the main problem is the wiring between GND (black cable ) and 5V (red cable) on the red board and the shield. I have no idea where they are supposed to go on the shield...

G, V, S = Ground, Voltage (probably +5v DC), Signal

Those pins on that "sensor shield" are arranged like that in order to connect servos, which have three pins to control them - one for ground, one for voltage to power the servo, and one for the PPM signal to the servo.

Now - obviously as you have done you don't need to connect servos - but now you know where the grounds are. Also:

This is not likely your exact shield - but it is probably almost identical, and can also help you figure out things. But you definitely need to get your ground and power sorted out, first.