The inverse-square decay law of the illuminance of a point light source with distance is a common notion of basic optics theory, which is readily demonstrated to be a direct consequence of the propagation of spherical wave fronts with the centre at the light source. It is far less common to address the experimental verification of this law and, even less, to study the illuminance decay with the distance of extended light sources, which somehow represent an unknown topic. We propose a scientific experiment where the light sensor of a smartphone is used to collect illuminance data as a function of the source-to-sensor distance and orientation. Through this procedure, students can realize the limit of validity of the inverse-square law and determine the luminance flux of the chosen point-like light source (e.g. the white LED flashlight of a smartphone). More interestingly, when dealing with extended sources (e.g. the LCD of a laptop displaying a white image) subtle characteristics of the decay trend emerge, particularly for distances lower that the source size. A detailed analysis of these characteristics is presented though a process allowing student engagement in a real scientific investigation, envisaging steps of data acquisition through experimental measurements, model construction on the basis of the observed patterns, and finally model testing. We provide a guided formulation for the general modelling of planar emitters, starting from the theoretical treatment of Lambertian sources. In this way, students are able to quantify the luminous emission also for extended sources and their deviation from a Lambertian behaviour.