Go Down

Topic: RC car (DC Motor) dont react to arduino board (Read 49 times) previous topic - next topic


Jul 10, 2016, 12:09 am Last Edit: Jul 10, 2016, 12:31 am by biscottoesse
Im trying to add a Leonardo board to the 'brain' of a cheap RC car by connecting the
- Front
- Back
- Left
- Right
- Ground
to my arduino

Currently I just have the VCC/Ground/Back(connected to Pin 3~ PWM)
And Im running the following code:

Code: [Select]

    const int frontpin = 7;     //pins of the RC
    const int backpin = 3;
    const int leftpin = 6;
    const int rightpin = 5;
    int frontstate = 0;         //inital states of the pins
    int backstate = 0;
    int rightstate = 0;
    int leftstate = 0;
    void setup()
    pinMode(frontpin, INPUT);    //declaring RC pins as inputs
    pinMode(backpin, INPUT);
    pinMode(rightpin, INPUT);
    pinMode(leftpin, INPUT);
    void loop()
      frontstate = digitalRead(frontpin);  //reading changes in RC pins
      //backstate = digitalRead(backpin);
      backstate = HIGH;
      rightstate = digitalRead(rightpin);
      leftstate = digitalRead(leftpin);

I set the "backstate = HIGH;" so I could see if the motor stars goes backwards, also I tried change the value to "HIGH"... but no results.

I started search some examples on internet (about hack a rc car and about DC motor) and I came up with a couple of codes that even making sense, didnt worked for me.

Dunno if Im connecting something bad, or if Im overlooking something.

PS: my purpose is having the rc car moving, receiving the controls from the arduino board.

Would be appreciated if someone could lend me a hand or tell me where I can find some info about the matter, since Im still new on arduino


Setting a variable to HIGH does not affect the external world, its just a storage location
in RAM on the microcontroller.  digitalWrite() and analogWrite affect the external world,
and then only when to an OUTPUT pin.  You have no OUTPUT pins.

You'll need to provide full information on this device, we have absolutely no idea what 'up', 'back'
etc signals you are talking about are.  You might be risking frying your Arduino, or the car's circuits.

So which RC car?  Photos of the PCB and signals you are talking about would be good - you
need to identify the motor driver or ESC(s).
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


thanks for the answer, i tried search the name of the board on google but nothing really comes up

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131