Who was the only past President of the United States to hold a patent for an invention?

Who was the only past President of the United States to hold a patent for an invention?