Het huidige protocol beschrijft de generatie van Drosophila melanogaster die eNpHR2.0 of ReaChR-opsinen in het hart tot expressie brengt voor OCT-beeldvorming en optogenetische hartpacing. Gedetailleerde instructies voor Drosophila OCT beeldvorming en hartslagmodulatie, inclusief de simulatie van herstelbare hartstilstand, bradycardie en tachycardie bij levende dieren in verschillende ontwikkelingsstadia, worden gerapporteerd.