Traffic lights were used before the advent of the motorcar. In 1868, British railroad signal engineer J P Knight invented the first traffic light, a lantern with red and green signals.
On 9 December 1868 the first, non-electric, gas-lit traffic lights were installed outside the Houses of Parliament in London to control the traffic in Bridge Street, Great George Street and Parliament Street. They were promoted by the railway engineer J. P. Knight and constructed by the railway signal engineers of Saxby & Farmer.
see Wikipedia article on Traffic Light
In 1886, the first petrol- or gasoline-powered automobile, was invented by Karl Benz.This is also considered to be the first “production” vehicle as Benz made several other identical copies. – wikipedia
Motorcars were introduced to the US in the late 1890s and the need for traffic control soon became obvious. A number of people came up with ideas for traffic control. In 1910, Earnest Sirrine of Chicago, Illinois filed for a patent (no 976,939) for what is considered the first automatic street traffic system, using non illuminated words STOP and PROCEED.
In 1912, Lester Wire of Salt Lake City, Utah invented an electric traffic light that used red and green lights. However, he did not apply for a patent. The next year, James Hoge received patent no 1,251,666 for a manually controlled traffic light system using electric lights. It was installed in Cleveland, Ohio in 1914, displaying the words STOP and MOVE
The first traffic light system to use red and green lights were patented by William Ghiglieri of San Francisco, California in 1917 (patented no 1,224,632). His design could be operated manually or in automatic.
The amber light was added in 1920 by William Potts, a Detroit policeman. He actually invented several traffic light systems, including the overhang four-way system, but did not apply for patents. The first person to apply for a patent to produce inexpensive traffic lights was Garrett Morgan, who received his patent in 1923.
The credit for taking all your parking credits goes to Carlton Cole Magee who invented the first parking meter in 1932, receiving a patent (no 2,118,318) for it in 1935. His Magee-Hale Park-O-Meter Company installed the first meter in Oklahoma City in 1935 and still produces most of the parking meters in the United States.
The first Don’t Walk signs were installed in New York City on 5 February 1952. Red remained the preferred color for warning signs because red elevates the blood pressure, heightening nervous tension, therefore the most likely color to attract attention. Yellow is used in signs aimed at vehicle traffic because it is the most visible color in the spectrum and can be seen from the farthest distance.