Pages: [1]   Go Down
Author Topic: Ground as Input  (Read 320 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: 66
Posts: 2461
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

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 598
Posts: 33328
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: