I'd like to use pins as switches.
Like connect pin 4 to 5 so that current can flow from 4 to 5 or from 4 to a specific collector pin like 12, then all other pins could be switched to that.
Here's what I want to use it for:
I have a radio doorbell which has 6 pins on the back both the sender and the receiver. They change the frequency. You have to pull the same pins out on both of them so they stay on the same frequency.
Now I want to brute force it so that it plays through every single possibility but not lighting up LED-s but connecting these pins in the sender.
I have the code working for the LED-s, now I'd like to use those pins as switches.
It appears to me from the schematic that the jumpers pull the lines to Ground. In that case the voltage doesn't really matter and al you need is a digital pin that you set to OUTPUT, LOW to simulate a jumper and INPUT to simulate a removed jumper.
// Step through every combination of pins 2 through 9
for (i=0; i<256; i++)
{
for (pin = 0; pin < 8; pin++)
if (i & 1 << pin)
{
// Jumper Absent
pinMode(2+pin, INPUT);
digitalWrite(2+pin, LOW);
}
else
{
// Jumper Present
pinMode(2+pin, OUTPUT);
digitalWrite(2+pin, LOW);
}
// Now that the 8 pins are set you can simulate a button press.
}