Communication between 2 Unos on any pin

So I recently came across a problem with our project where we had to perform communication between 2 unos without using the uart pins, we only had access to a few non-pwm pins.
I tried looking for solutions but got nothing. So I spend a few days working on some sort of primitive protocol using a single pin only. Its not very fast but it has a very low error rate and very easy setup and wiring. I tried to make it as user friendly as possible, and possibly help someone who's facing a similar challenge as ours.

Any reason why you did not use SoftwareSerial or one of it's alternatives.

You should not use pinMode (or access other processor hardware) in a constructor Constructors are called before main() is executed and the main() might change things. Rather add a begin method.

Maybe I don't understand how it exactly works but connecting two outputs together is always risky; if the one board drives its output high and the other one drives it output low, something will break. A series resistor in the line to limit the current would be advisable.

We couldn't use SoftwareSerial as the supported pins where occupied by a shield on our board.

I would consider the begin method indeed it seems more practical, and the resistor too.

As I said earlier, this library indeed may suffer from a lot of limitations due to the fact that I'm not that of an expert developer, but it might provide that help when no other solution is available.

The documentation implies that software serial works on all UNO pins, apart from 13;

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.