I've got two standalone circuits (one 328P controlled and one Tiny24 controlled) and each one switches between some different led lighting patterns in response to the operation of its own hall sensor. Each sensor operation currently changes the lighting pattern on its connected circuit only.
I now intend that no matter which of the two hall sensors are operated, both circuits will change their own unique pattern in response to operation of either of the sensors and at the same time (no real timing issues here, within the same second is fine). The two circuits will never be more than 1500mm apart.
My question is in regard to which is the better of the following two ways to achieve this (leaving aside for a moment that there are probably many other better ways):
- The simplest way - connect the two hall sensors in parallel such that no matter which one is operated, both circuits see the sensor change and do "their own thing" in response and simultaneously
- The more complicated way of using two wires between the circuits and no matter which circuit's hall sensor is operated, that circuit sets the two connecting lines high, low, or one high one low (or vice versa) for the other circuit to read and react to, ie one of four binary states, which is just the number of different patterns I need to control. The two lines would enable both circuits to see the current state, . Both circuits would continuously check the line states, both see the same binary pattern and will be programmed to react accordingly.
The way I see it is that whilst the first option is much simpler, the second is more foolproof in that both circuits will "see" what state it is expected to be in all the time, and not run the risk of missing a sensor read when the other circuit HAS read it, and hence getting out of sync with the other circuit.
I'd like to hear a more experienced view on this though please. The coding is not a problem - its the more elegant and reliable solution I'd like help in choosing (or would I be better off using IC2?).
Many Thanks Bernie