Initial version of the powermon firmware. Needs cleanup.