I'm not new to electronics, but this is my first time messing round with I2C and relays. I was wondering if I could run I2C signals through the load side of the relay and they still come out properly and working. It is a solid state relay if that makes a difference. Could be a dumb question but I just want to make sure. Thanks.
Thanks for your interest. I am making a project where I have a RTC and an OLED display on an Arduino Pro Mini. I need to have a momentary push button that when pressed switches to the RTC lines for the duration of the press. I looked into creating an I2C bus so I could have both at the same time and just switch in code, but I heard that it gets complicated when programming. I also have no clue how to even go about an I2C bus and what resistors etc I would need to create one.
The I2C bus is a bus. That means that several devices can coexist on the bus as long as each device has a unique address. There should be no problem having the RTC and OLED on the bus at the same time.
It makes it much easier to program for a RTC or a LCD if you have a proper library for that particular device. Then the library will have example code showing how to set up the code to talk to the I2C bus and the device.
Post part numbers, data sheets or technical data showing what exact parts that you have and we can recommend appropriate libraries.
Oh okay. I was told it got difficult in programming but I believe you over the 6 year old YouTube video I found. How do I join them together? Do I literally just solder both of them onto my board?
It can get a little more difficult if each of the devices don't have different addresses from each other, but in your case they do have different addresses.
If they did not have different addresses, and could not be configured to have different addresses, then you would use the multiplexer I suggested earlier. I had to guess what your problem was because you gave so little detail in your question.
In electronics we usually will build the circuit using a convenient method, like a solderless breadboard, for development and testing and when that is done to satisfaction, condense the circuit down and build the final version on strip board or a purpose made PC board. Get it to work first then worry about packaging.