Two-phase measurement using arduino

I'll work on a better schematics, besides lowing down the R1 value, since i've changed to a H11AA1. Good night, bud.