The value -127 is an indication of the DTCLib that the communication went wrong.
So it seems that the code is working properly but there is something wrong with the hardware connection.
- wrong pin?
- no pull up resistor?
- wrong mode?
- interference?
- loose wiring?
So follow raschemmels advice and send us at least the schematic.