I am attempting a project where I need to control 6 relays over I2C using two Arduino Uno's. The first UNO will be the input board where 6 digital inputs will control six digital outputs on the second UNO (the relays will be run via mosfets). Has anyone attempted a similar project? I have tried but cannot get it to work . If anybody has a similar sketch could they post it please?
"It"? What is "it"? You have some unspecified wiring with some unspecified code that does some unspecified stuff. What it does is, apparently, not what you want. How can you realistically expect help when there are so many unknowns?
sorry, the code I wrote would basically be of no help, I was just wondering if someone had done something similar and got it to work. I am using two arduinos 1 for the input board and then over the i2c connection board number 2 which controls the relays.
The application is for a underwater rov, I have limited cat5 pairs going to the rov from the surface. At the top I would like to have one arduino with the switches for control connected, at the rov end I want to use another board to receive the data from the first board and send it out to mosfets then into relays.
lochienichols:
sorry, the code I wrote would basically be of no help, I was just wondering if someone had done something similar and got it to work. I am using two arduinos 1 for the input board and then over the i2c connection board number 2 which controls the relays.
Why I2C? the Serial communication will be much easier. You can also extend with a proper comman format