Edison invented the ancestor of the tattoo gun -- the pneumatic stencil pen. This machine, which Edison patented in 1876, used a rod tipped with a steel needle to perforate paper for printing purposes. It's important on its own as one of the first devices that could efficiently copy documents.
In 1891, tattoo artist Samuel O'Reilly was awarded the first patent for a tattoo machine -- a device allegedly based on Edison's stencil pen. O'Reilly apparently produced only one of the machines and that was for his own personal use -- there is no record of his marketing his device.
O'Reilly immigrated to New York City from Ireland in 1875. After he developed his tattoo machine, many sideshow and circus attractions began frequenting his shop at No. 11 Chatham Square. The machine was much quicker than hand tattooing, and the performers thought it gave cleaner results. After O'Reilly's death in 1908, a student took up his trade and machine and worked at Coney Island until the 1950s.