Change the pin state of an arduino using one wire only.

Hi everybody! I have a problem, hope somebody can help. I'll try to explain. In my sketch, pushing a button, the state of a pin, changes from HIGH to LOW. The pin is setted as an INPUT_PULLUP and connected to the ground through the button. In my project two arduinos are used. My question is: is there any way to change the state of the pin of the first arduino using the second one as trigger, with only one wire available?

You should draw us a schematic.

Do you mean 1 wire for the signal and you have a common GND between the two Arduinos ?

How are your Arduinos powered? If they are powered by the same supply, then the grounds are already common and you can just connect the wire. If not, then you have a problem because electricity "goes in a circle" to be prosaic.

What did you exactly meant ? Did you mean single wire for input and output ? Also please post the code so we could understand more clearly

Thanks for your replies. I'll try to better explain my problem. I have two Arduinos with different power supplies. One is powerded with usb cable and the other with a battery. The first one is on a manequine and it's used to light on a led when a metallic plate is hit, the other one on a sword and it is used at the moment, to swich on a vibrating motor only. There are several targets on the manequine to be hit. For semplicity, just consider one. The target is a metallic plaque connected to a digital pin. The sword is connected to the ground of the Arduino on the manequine. When the sword hits the metallic plate, the digital pin, set up as an INPUT_PULLUP, is grounded and so goes from 5v to zero. The code recognise this change and lights on the corrispondent led. I would like to eliminate the wire connecting the sword to the ground of the manequin's Arduino without using any pushbutton on the manequine that I guess would be the easiest way. I was asking how I could obtain this. Is there any chance to use the sword's Arduino , to tell the first Arduino that the metallic plate has been hit? I have tried to connect the sword to the ground of the second Arduino. It doesn't work. I have tried also to unplug the sword from the first Arduino and use without any wire, something happens...sometimes it works, the led is switched on sometimes but I have seen this metod is not reliable, I don't know why.

This is the skematic:

Paste the image here.

This is the image.

"the other one on a sword"

Epee, foil, sabre, something else?


When I built my fencing scoring machines, what I did was send out pulses on one pin and read it back on another pin. I used an open collector output with a pullup resistor to buffer the output pin.
When the button was open, the input would read high.
When the button was closed and pressed against cloth, the input would match the output.
When button was closed against ground the input would read low.

I had it simpler, the fencer was attached to a reel, so Gnd was detectable different than cloth.
What you can do is make the target look like a big capacitor so that the active signal from the arduino looks like it is being shorted to Gnd, as caps take 'a while' to charge up. (like the Reset cap on the Arduino takes a while to charge back up after a DTR level is applied).

So, find a way to make your plate look like a capacitor, with a resistor to bleed the charge off after the pulses from the attacker's sword charges it up.

That was the idea behind the HitMate - the opponents body cord against his body acted like a cap to short out the attackers signal so the attacker's electronics could see the button being closed.

It works pretty well. Uses up batteries quick. Didn't work that well with little kids.

Epee touches have to be in contact for 2ms to be considered a valid hit per USA Fencing Rules For Competition Appendix B, Section B for epee (as of 9/1/15, the latest version I have on hand).

b) Timing
The apparatus must register only the first touch which is made. If the interval of time between
two touches is less than 40 milliseconds (1/25th of a second), the apparatus must register a
double touch (both signal lamps must light up simultaneously). When the interval is greater
than 50 milliseconds (1/20th of a second) the apparatus must register only one touch (only one
signal lamp is lit). The tolerance allowed for timing the apparatus is that between these two
limits (1/25th and 1/20th of a second).
c) Sensitivity
When the external resistance is normal, that is 10 ohms, the apparatus must register touches
when these are made with a duration of contact of 2–10 milliseconds. With an exceptional
external resistance of 100 ohms the apparatus must still register a touch, but without any
specific duration of contact.
The apparatus must not register signals of less than 2 milliseconds duration.

Thank you CrossRoads! It seems a little bit too complicated for me. May you explain again how your fencing system works? Do you use a transistor between the two Arduino's pins? When the tip of the attacker is open the input is high and what about the output? When the button is closed against cloth, what do you mean with" the input will match the output"? May you send me a skematic, please? Do you think a capacitive switch could work for me?Thanks for your help!

May anyone else try to explain in a simpler way what Crossroads tried to tell me. I didn’t understand if he used a fisical transistor or if he just simulated a transistor function. How are output pin and the input pin connected? I am very interested in.