Arduino Forum

Using Arduino => General Electronics => Topic started by: SilkyPantsDan on Mar 05, 2012, 05:18 am

Title: Check output pin has a connection
Post by: SilkyPantsDan on Mar 05, 2012, 05:18 am
Good afternoon/morning forum (depending on your location)

I have a rather simple question and an assumption that I'm trying to clarify. I've got a project that's now moving onto it's final phase for creation, but I would like to add the possibility for expansion. The project is a simple 'bomb prop' as so many others I seen, but I want to add the ability to sound an external 12V horn/buzzer on detonation.

While the procedure to hook something like this up normally is something I'm familiar with, I would like the prop to work without one if there isn't one available.

So my question is: How can I determine if there is something hooked up to the output pin or not, or in this case since the pin will be running through a transistor the pin won't really know?

I'm thinking I need to do something fancy with tying the pin to the ground if there's nothing there, and changing the pin to input for the check. Would this line of thought be correct? Or close to it?

I'm currently wading through a big list from Google about the subject as well, as it's bringing up some generic results

Thanks for the help :)
Title: Re: Check output pin has a connection
Post by: Coding Badly on Mar 05, 2012, 06:27 am
Quote
How can I determine if there is something hooked up to the output pin or not


Why bother?  If nothing is connected to the pin nothing bad is going to happen.
Title: Re: Check output pin has a connection
Post by: SilkyPantsDan on Mar 05, 2012, 06:29 am
More for future reference, as I have an idea for another project that I would like to do things based on if something is connected or not
Title: Re: Check output pin has a connection
Post by: retrolefty on Mar 05, 2012, 06:51 am
I can't think of a easy practical way for a running program to tell if there is anything wired to a digital output pin or not. Some other external form of feedback will be required.

Lefty