One of the drawbacks, in my opinion, of the raspberry pi and the pine64 A+ is the lack of any analog inputs. To read an analog signal requires an external analog to digital converter chip, and will tie up several of your GPIO lines. My new module has routines to read values on an MCP3004 or MCP3008 10-bit analog to digital converter.
Here is some sample code ->
#5 bits because the first is the start bit
($reading, $binval, $voltage
) = $adc->read300x(\@ch0, 50, 5.01);
= sprintf("%.3f", $voltage);
"binval: $binval\tvoltage: $voltage vdc\n";
Here is the output of the script ->