I am eager to figure out how to measure the specific gravity of my wort using a Raspberry Pi, Arduino, or other device, but I do not wish to spend $250 for a BeerBug. People on the internet have used the RPi to count bubbles per minute in the airlock and charted them on a graph.
My sole purpose of this is to determine when my RPi should tell my Fermwraps to turn on and increase the heat of the carboy. On this stackexchange I've been told it is a good idea to warm up the carboy a bit when fermentation has slowed down or stopped.
If yeasts consumes sugar and produces alcohol and CO2, and the only way for the CO2 to escape is through the airlock, then once C02 stops escaping through the airlock, no more C02 is being produced. Therefor, counting air bubbles in the airlock is a reasonable method of determining if fermentation has stopped.
What is wrong with this syllogism?