A leadless cardiac pacemaker comprises a housing, a plurality of electrodes coupled to an outer surface of the housing, and a pulse delivery system hermetically contained within the housing and electrically coupled to the electrode plurality, the pulse delivery system configured for sourcing energy internal to the housing, generating and delivering electrical pulses to the electrode plurality. The pacemaker further comprises an activity sensor hermetically contained within the housing and adapted to sense activity and a processor hermetically contained within the housing and communicatively coupled to the pulse delivery system, the activity sensor, and the electrode plurality, the processor configured to control electrical pulse delivery at least partly based on the sensed activity.