v0.2 of apsensor.py