I've been making wine with my family ever since I can remember. It's a fairly straight forward process that is nearly impossible to master. The wine my family made always started a grape varietal (such as Merlot or Sangiovese). We would crush the grapes and throw the slurry into primary fermentors where we would add a specially cultured wine yeast. After a few days of this harsh smelling fermentation, we would then press the grapes and put the liquid into glass carboys where you would then add chemicals, sugar, and put the liquid under a water lock to keep natural-air yeasts from infecting the brew and turning it to vinegar. This goes on and on for months, until you might end up with something that tastes pretty good.
Now let's say you're a poor college student. How to brew cheap wine? You can combine grapes (or cheap Welch's grape juice), some water, and some yeast (I even sunk so low at one point where I used bread yeast) and you will undoubtedly end up with something that resembles wine. It won't taste good! But it should get you snake-eyed. Either approach uses a very straight forward biological process of yeast, eating sugar, and giving off CO2 and alcohol. Wouldn't it be fun to see how this biological process acts over time?
I decided to return to my roots and whip up a batch of world (in)famous homemade wine. And while I was at it, why not log the bubbles that are given off during fermentation?
Now the idea is to take the Logomatic and reprogram it to record when a bubble goes by.
As with any logging project, getting the data is easy, visualizing it is the hard part. One of the problems with the logs is how the events were saved. The logs looked something like this:
This made it very difficult to graph in Excel (or Calc because we use Open Office). These spreadsheet programs expect time to be linear. In my logs, time jumped around as the bubbles rolled through. I also had 7 or 8 logs as each morning I would reset the system to make sure I didn't overflow any given text log file. So to stitch the logs together and fix the time-base problem, I created this quick and dirty Visual Basic program. I publish it so that hopefully you can use similar text file parsing tricks as the basis for your own log challenges.
Can someone show me how to write something similar in Python? I should really learn Python one of these days.
After stitching, I ended up with a nice linear time-based CSV file (check it out!) that can be easily imported into your favorite graphing program. In this case, I used the very limited Excel to graph the bubbles per minute over a 10 day period: