Leonardo da Vinci studied and designed camera obscura arrangements that projected an outside image into a dark room.
A camera obscura uses a darkened enclosure with a small opening. Light passing through the opening forms an image of the scene outside on an interior surface, usually appearing inverted. Leonardo carefully described this optical effect and used it to investigate vision and image formation.
The principle was known before Leonardo, but his notebooks contain detailed observations and diagrams that connect it with his scientific study of the eye. He was interested in how light travels and how the visual system receives images.
A camera obscura is not a telescope, microscope, or periscope. It is a projection system based on a small aperture, and it became an important precursor to photographic cameras. Leonardo did not invent photography itself.