Go Down

Topic: Ground as Input (Read 366 times) previous topic - next topic

Can I use a ground as an Input Signal?

I want to create a VVL Controller for vehicle, but I want to Impliment a few LED's into the circut, which is easily enough done.

Basically I want if say pin 3 Begins to Ground (which would be an Input), switch pin 10 (led) on, and same again on another few pins?
Stigs Scottish Cousin

Riva

Depends on what the device is that pulls the signal low on the input pin. You may need external pullup resistors or enable the internal ones on that pin 'pinMode(3,INPUT_PULLUP);' Then the digital input will go low when grounded by the external signalling device, you would check this with something like 'if (digitalRead(3) == LOW)'


Go Up