Code: [Select]if (data_available == true);Lose the ; that makes the if statement not work.
if (data_available == true);
after removing the ; there is no output on serial monitor
Your zero cross interrupt is not being triggered. We are now back to hardware, and what you have for an input signal to the interrupt pins?You chose not to use the optocoupler for zero cross detection. You have not demonstrated that you have applied the direct signal reading method correctly. Please post a sketch of your circuit.
1) The 1M resistors are way to high to correctly trigger the logic inputs.2) You have no protection for negative voltages. I would check those pins still work. Enable the pull up resistors, disconnect that circuit and dab a ground wire on both the inputs and see if you get printing. 3) The timing between those two signals do not in any way indicate any sort of phase shift. So there is nothing to measure except the small time between the two signals reaching the triggering threshold when and if you get them triggering.
No you didn't that note is only for experts it is not a beginner's guide. There is a lot you have to understand. First exactly what phase shift do you want to measure?