Semaphore is the use of an apparatus to create a visual signal transmitted over distance. A semaphore can be performed with devices including: fire, lights, flags, sunlight, and moving arms. Semaphores can be used for telegraphy when arranged in visually connected networks, or for traffic signalling such as in railway systems, or traffic lights in cities.
Sailor with signal lamp
Heliograph
Electric telegraph
Telegraphy is the long-distance transmission of messages where the sender uses symbolic codes, known to the recipient, rather than a physical exchange of an object bearing the message. Thus flag semaphore is a method of telegraphy, whereas pigeon post is not. Ancient signalling systems, although sometimes quite extensive and sophisticated as in China, were generally not capable of transmitting arbitrary text messages. Possible messages were fixed and predetermined, so such systems are thus not true telegraphs.
Replica of a Chappe telegraph on the Litermont near Nalbach, Germany
Great Wall of China
Cooke and Wheatstone's five-needle, six-wire telegraph (1837)
A Morse key (c. 1900)