Negative voltage on input pins
Two things that are necessary for this to work.

1) You need to make sure that the GND of the PI board is connected into the GND of the direct power supplies.

2) You need to make sure that the the two schematic symbols below actually connect together.

   &lt;== ??? ==>