Pages: [1]   Go Down
Author Topic: Ground as Input  (Read 299 times)
0 Members and 1 Guest are viewing this topic.
Edinburgh, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Stigs Scottish Cousin

Norfolk UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2203
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)'
Logged

Handle every stressful situation like a dog. If you can't eat it or hump it. Piss on it and walk away.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31332
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have a look at this:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html
Logged

Pages: [1]   Go Up
Jump to: