Back in the day a student at my dorm in college decided tit would be a cool idea to make a webserver for our laundry machines so that we could tell if there was one free without going down to the basement. It attracted some interest, and was even Slashdotted a couple of times over the years. Between Slashdottings one and two a company applied for a patent on the idea of connecting laundry machines to web servers. Much later, after our dorms laundry server had been in operation for about a decade, they sent us a cease and desist letter. We informed them that they'd lose their patent if they took us to court and didn't suffer, but they are still charging people millions of dollars for the system their invalid patent gives them a monopoly on.
After I got my Master's I started work at a consultancy that did custom sensors. They had previously outsourced their engineering, but the company that had been given the engineering work had tried to patent the ideas of the consultancy out from under them. Luckily the consultancy had filed for patents first, but the company was granted one of the patents anyways.