Improved `VoltageSensor::trigger()` method

`VoltageSensor::trigger()` method now saves data and gives as output the
correct voltage/current values computed with the parameter specified in
the constructor. Changed pin paramenters in constructor and attributes (now two).