Joseph Fry 1841
The process of turning cocao into a tablet or bar of chocolate was first perfected in Bristol, Gloucestershire by Joseph Fry of Fry & sons in 1841. Although chocolate had been consumed for many years it was usually as a gritty health drink.
...
Fry used a Watts steam engine to help grind the cocoa beans to a much finer powder than had previously been achieved. The machine could not only grind more thoroughly but it could output greater amounts of ground cocoa. This gave the chocolateers more time and energy to improve the product to the confectionery candy bar that is now consumed all over the world.