Coding a physical switch as an output?

Hello, as the title states, I'm trying to code a physical switch on my breadboard. I have a HT12D/HT12E (decoder/encoder) for an RF transmitter kit.

My goal is to have multiple RF transmitters to 1 receiver with each transmitter wired to have different addresses. These addresses are set by having address pins being open or connected to ground.

The challenge is to find the address with the data. When the transmitter receives data, I want to shuffle through the known addresses.

I want to know if it's possible to code in Arduino a digital output that's either open or ground

Hello, as the title states

Is that a statement?

What are you really trying to do?
What did your teaching staff say?

Sorry, that was poorly worded.

What I'm trying to do is break a circuit with digitalI/O on the Arduino and I want to know if that's possible or if there's a better way to do it.

OP, are you asking whether you can use your arduino to set an address for your RF module by setting arduino output pin values?

You can set your arduino pin to input without pullup to "disconnect" from the RF module pin. Set arduino pin to output and write it to LOW to make it connect the RF module pin to gnd.

It isn't clear how what you're trying to do has anything to do with looking at digital pins.

Are you just talking about reading the pins to see what the address is? That doesn't need anything like what you're talking about which is why I'm confused. If this is what you're doing, just set the address selection pins INPUT_PULLUP, so they'll either be unconnected (HIGH) or grounded (LOW) - this gets you 2^(number of pins) possible addresses, so unless you're deploying a massive system, this should be plenty.

Or are you talking about osmething totally different? In that case, you need to explain what it is.

Also, since when does a transmitter receive data?

Sorry for the confusion, I think I misunderstood how the HT12D decoder worked, and I think liuzengqiang phrased my question better than I did.

I want to know if I could set an address with my Arduino kit and the last two replies have answered my question :slight_smile:

I for one am still confused - I think what you want can be done but can't picture what it really is.
Why don't you draw some images of what's going on, marking clearly what signals you need and where the Arduino comes in. That'll probably help a lot.

OP is trying to set the address of each module by "software" so the RF modules are set at the time of code upload, not by hardwiring the pins to 5V or gnd.