Erick Engelhardt
Erick Engelhardt

Reputation: 734

Arduino Input pin from external system

Is possible for Arduino to receive a 5V into a inputPin from a external battery?

If I have a system that has it's own power supply and after an event fires 5V. How can Arduino read this input?

Upvotes: 0

Views: 2083

Answers (1)

MAC
MAC

Reputation: 429

This is an electrical problem, no software issue I presume.

Here is how to proceed: 1) Make sure both boards have the same ground (connect GND together and make sure there is no conflict) 2) Connect your output to an input on the Arduino board (pin 2 e.g.). This connection is preferably done using a resistor, 1 kOhm will be ok.

On software side, just set this pin as input pinMode(2,INPUT); in setup() and then get its value status = digitalRead(2); in loop().

Upvotes: 2

Related Questions