In the figure we have the way to use a common LED as a light sensor. The operational power supply must be symmetrical. Other operatives can be used.