Practical demonstration of cardiomyocyte function requires substantial preparation, a source of freshly isolated animal hearts and specialized equipment. Even where such resources are available, it is not conducive for demonstration to any more than a few students at a time. These approaches are also not consistent with the 3R principle (replacement, reduction and refinement) of ethical use of animals. We present an implementation of the LabHEART software, developed by Donald Bers and Jose Puglisi, for medical students. Prior to the activity, students had lectures covering the physiological and pharmacological aspects of cardiac excitation-contraction (EC) coupling. We used this problem-based activity to help students consolidate their knowledge and to allow a hands-on approach to explore the key features of EC coupling. Students simulate and measure action potentials, intracellular calcium changes and cardiomyocyte contraction. They also apply drugs which target ion channels (e.g. nifedipine or tetrodotoxin), or sympathetic input (using isoproterenol) and explore changes to EC coupling. Furthermore, by modifying the biophysical parameters of key ion channels involved in the electrical activity of the heart, students also explore the effect of channelopathies such as long QT syndromes. We describe approaches to implement this activity in a flipped classroom format, with recorded lecture materials provided ahead of the practical to facilitate active learning. We also describe our experiences implementing this activity online. The content and difficulty of the activity can be altered to suit individual courses, and is also amenable to promote peer-driven learning.