UNO Detecting 24 vac via TWO OF optocoupler (HCPL3700) not working

We need to see your schematic and wiring too.


You may need:

pinMode(sensorPin, INPUT_PULUP);

pinMode(sensorPin1, INPUT_PULUP);