It is well known that one of the features of a laser diode is its wavelength tunability which can be modulated with a variable injection current and/or temperature of its active region. For many industrial and scientific applications it is desirable that the laser gets stabilized. In this paper, on the contrary, the laser diode is turned on-off for a short period of time. The generated peak variations of voltage and temperature will cause a modulation of its wavelength. This modulation is used to add phase-shifts in an unbalanced Twyman-Green interferometer and by using Carré algorithm the phase of the resulting interference wave will be retrieved.