During one of his many experiments around the middle of the 18th century, Benjamin Franklin noticed that a pith ball or cork would initially be attracted to a charged object, but if the two touched the ball would be repelled. He realized that this was because the two objects were initially charged differently (dissimilar charges attract) but once they touched they took on the same charge (similar charges repel).
Franklin realized that if he replaced the charged object with a bell, he could make an "electric bell." He soon found practical use for his bell as a lightning detector. When connected it to his lightning rod, the bell would ring whenever an electrical storm was nearby.
Note: the hanging bals are missing.