Add electricity measuring

Add functionality to measure electricity with the ambient light sensor.
This results in the time stamp of each pulse being stored in the
in-memory database