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" ?
-
\$\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– Peter Bennett2013年10月12日 21:48:50 +00:00Commented Oct 12, 2013 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– Deepsy2013年10月13日 01:43:31 +00:00Commented Oct 13, 2013 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– Peter Bennett2013年10月13日 07:06:56 +00:00Commented Oct 13, 2013 at 7:06
1 Answer 1
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);
}
Explore related questions
See similar questions with these tags.