Nature recently posted an interesting video [1] about what causes developing hearts to have their first beat. The gist is that eventually random electrical noise triggers a propagating wave which is then continued and repeated by the cellular automation nature of heart tissue. You don't need as much software if your system is composed of emergent properties.
[1]: https://youtu.be/SIMS2h5QsZU