1
\$\begingroup\$

I found a old RC Car. I'm electronic begginer, so my question might be dump, but I can't figure out how I can do this. I Separated the remote and connected it's power to the Arduino board.

At this time the project looks like this: ( It's working ) enter image description here

My goal:

enter image description here

The Problem:

The buttons are connected to the chip and to the ground. If the button was connecting the 3.3v to the chip, it was going to be fine, I was just going to do as the picture ( My goal ) above, but now I don't know how I can accomplish my goal. My question is how I can switch pins between ground and "chain breaker" ?

\$\endgroup\$
  • \$\begingroup\$ If I understand you correctly, all you have to do is program the Arduino so that the output pins are high when inactive, and low to simulate a button press. (what do you mean by "chain breaker"?) \$\endgroup\$ – Peter Bennett Oct 12 '13 at 21:48
  • \$\begingroup\$ Thanks for the answer, 1 more question: When pin is on HIGH the voltage is 5V, but the remote needs only 3.3V, can I attach a resistor to the ground? \$\endgroup\$ – Deepsy Oct 13 '13 at 1:43
  • 1
    \$\begingroup\$ @deepay - if possible, you should set the Arduino output to be open collector, with no internal pull-up resistor. I don't recall if all output ports will do this - check the datasheet for the AVR micro used in your Arduino. With no internal pull-up, the circuit will depend on the external device to supply the pulll-up. \$\endgroup\$ – Peter Bennett Oct 13 '13 at 7:06
0
\$\begingroup\$

I fixed my problem by switching the pinMode like this:

void on(int btn) {
    pinMode(btn, OUTPUT);
    digitalWrite(btn, LOW);
}

void off(int btn) {
    pinMode(btn, INPUT);
}

void setup() {
    off(13);
}

void loop() {
    on(13);
    delay(1000);
    off(13);
    delay(1000);
}
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.