Thanks,
I had not thought of what happens at start up with the outputs, this is not a big deal as worst case the motors or lights blink for a split second. however to prevent this would i be better changing my output Optos to work on an active low state? i assumed that when the micro was turned on the pins would be low untill changed.
also regarding the resistors r1-r3 what are your thoughts? do i need them? my reasoning for r1 and r2 on the inputs are so that the led of the opto is pulled to ground and not left floating, however when i activate an input switch it is going to give a slight voltage divide, should i re calculate the current limiting resistor for the opto to account for this or can i simply remove R1 and R2 and leave the inputs floating? as i dont think there could be enough interference on the 24v side to light up the opto (however i maybe wrong)