The terpy-derived (terpy=terpyridine) ligand 1 has an extended W shape in which the two appended photoactive pyrenyl groups are held apart. On binding of a zinc(II) ion with a terpy group, ligand 1 is converted into complex 2 whereby it adopts a U shape, thus stacking the aromatic units. This structural modification leads to a very pronounced change in photophysical properties: from a highly fluorescent free ligand to a very weakly emitting complex. The W/U structural switching can be reversibly induced by the addition of a competitive tren ligand, which binds and releases a zinc(II) ion under protonation/deprotonation cycles, thus leading to oscillations in light emission. Therefore, the present system performs periodic modulation of optical output through a nanomechanical shape-flipping motion, triggered by metal ion binding and fuelled by acid-base neutralisation energy. Overall, it represents an ion-triggered opto-mechanical supramolecular device.