Page 1 of 1

GPIO 2& 3 -> I2C, 28 & 29 -> relay control

Posted: Sun Dec 29, 2013 2:20 pm
by iganin
Hi,

I try to find out if i can use GPIO 2 and 3 for I2C interface meanwhile GPIO 28 and 29 to control relays via a python script.
It seems that activation of I2C takes over 28 and 29 as the second I2C bus.

Thank you in advance for your help.

Best Regard.
Iganin

Re: GPIO 2& 3 -> I2C, 28 & 29 -> relay control

Posted: Sun Dec 29, 2013 5:11 pm
by Richard-TX
You can but you have to reassign the pins.

This chart should help.

http://elinux.org/RPi_BCM2835_GPIOs

Re: GPIO 2& 3 -> I2C, 28 & 29 -> relay control

Posted: Sun Dec 29, 2013 5:36 pm
by iganin
Thank you for your fast response.

Could you please also help me to find out how I can do that?

Thank you.

Re: GPIO 2& 3 -> I2C, 28 & 29 -> relay control

Posted: Sun Dec 29, 2013 5:41 pm
by Richard-TX

Re: GPIO 2& 3 -> I2C, 28 & 29 -> relay control

Posted: Sun Dec 29, 2013 5:48 pm
by Richard-TX
Why use GPIO 28 and 29?

Did you use up all the rest? If so, I would look into using a MCP23017 chip. Cost is between $1-$2 and is easy to program and use.

Re: GPIO 2& 3 -> I2C, 28 & 29 -> relay control

Posted: Sun Dec 29, 2013 5:51 pm
by DougieLawson
Richard-TX wrote:Why use GPIO 28 and 29?

Did you use up all the rest? If so, I would look into using a MCP23017 chip. Cost is between $1-$2 and is easy to program and use.
I'd second that. I've now got two expansion boards that have that chip on them. One is the driver board for my 8x8 LED matrix.

Re: GPIO 2& 3 -> I2C, 28 & 29 -> relay control

Posted: Sun Dec 29, 2013 5:56 pm
by Richard-TX
DougieLawson wrote:
Richard-TX wrote:Why use GPIO 28 and 29?

Did you use up all the rest? If so, I would look into using a MCP23017 chip. Cost is between $1-$2 and is easy to program and use.
I'd second that. I've now got two expansion boards that have that chip on them. One is the driver board for my 8x8 LED matrix.
If you do use it, you will thank us later. :D