Robert Foulis was born in Glasgow, Scotland and orginally worked to become a surgeon as Glasgow was, at this time, a world-renowned centre for such study. His own poor health, however, hampered his ability to do so and he instead turned his attention toward Engineering. He moved to Belfast, Ireland as a journeyman where he took up painting and met his first wife. Tragically, she died in 1817 after giving birth to their first child.
Foulis decided at that point to move to Ohio with his baby and begin a new life. During the voyage in 1818, his plans were interrupted as a storm forced him ashore in Nova Scotia. After making his way to Halifax, friends there convinced him to stay on a while and he turned to painting portraits to make a living, and soon began teaching painting at Mrs. Burns' English and Commercial Academy.
Sometime between 1821 and 1822, Robert moved to St. John, New Brunswick to work as a Civil Engineer. He met and married his second wife there with whom he had two more children. In 1825, he opened an iron foundry which he sold ten years later. In 1826, he was commissioned by the provincial government to survey the St. John River between Fredericton and Grand Falls. Later, he helped to establish the St. John Mechanic's Institute and in 1838, a school or arts.
According to legend, Robert heard his daughter practicing piano, and noticed how he could hear the lower notes from a greater distance, even through fog. This is said to have inspired him to invent a steam-powered foghorn, and a code system allowing each foghorn to emit a distinct, identifying code so sailors would know which one they were hearing. From 1854 until 1859, he worked to get the provincial government to allow him to build one on Partridge Island in St. John harbour. He was unsuccessful.
In that year, T. T. Vernon Smith obtained Foulis' plans and codes and was granted permission to build it, the first in the world. In 1864, after Foulis petitioned the government, they recognized that he was, indeed, the inventor. Despite that, the system was patented by Smith, an American, who gained from it financially while Robert Foulis died in 1866 in poverty.