Go Down

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

TheStigP11GT

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)'
http://forum.arduino.cc/index.php?action=unread;boards=5,67,10,11,66,12,15,17,21,22,23,24,25,29;ALL

Grumpy_Mike


Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview