This thread is great. I would love TO build one of these (with lots of instructions).
(Edit: stupid auto correct changed meaning of my post)
(Edit: stupid auto correct changed meaning of my post)
I noticed the ebay seller lists those flow meters as These swiss flow meters are like new. We went out of business before we could deploy most of them.. Is he sending you new ones, and if not, what were they used for?
eBay said:New other (see details)
A new, unused item with absolutely no signs of wear. The item may be missing the original packaging, or in the original packaging but not sealed. The item may be a factory second or a new, unused item with defects. See the seller's listing for full details and description of any imperfections.
eBay said:Used
An item that has been used previously. The item may have some signs of cosmetic wear, but is fully operational and functions as intended. This item may be a floor model or store return that has been used. See the seller's listing for full details and description of any imperfections.
You basically have two images, one on top of the other. the beauty of using background images is that they don't change size if you give the div a height/width. So the top image (which is the full one) will get cut off and then show the full height empty one. As long as the images line up, it looks seamless. I made an example here:
http://codepen.io/JayUnt/pen/vJcbk ( this is the first time i used codepen, so let me know if you cant get to it). All you have to do is change the height of .pint .full which is at the bottom of the css, to see how it looks at the different percents.
I've never used css masks before, but the idea would be the same. You would probably put the mask image inside the .full div and give it the background color of the beer you want. and then only make the height the percent that you want it full.
It might be easier to just go with an empty glass, and then a couple different versions of the full beer glass image and let the users choose from your preset list. This would be the same idea for the keg. When you get to below 25% full, you can just give it an additional class that will give it a different background image to be the red version. But everything else would be the same.
Let me know if that make sense.
And here is a good tutorial on css masks if you want to go that route. http://thenittygritty.co/css-masking. But I would suggest just doing the couple of images to make it easier.
I'm assuming you have the php loop through the different beers and output the html. So instead of having the height in the stylesheet you can put it right on the .full div. So it would look like this: <div class="full" style="height: 50%;"></div>.
I updated the codepen to show it working.
Using a css mask would probably be a lot more complex, at least creating the mask image. It would allow you to me more flexible with coloring, but like i said before, i would just go with the regular image route like in the codepen.
<div class="KegImage">
<?php
if ($keglvl['Beer1'] < 0)
echo "<img src=\"/img/keg/empty.png\" height=\"100\" alt=\"\"><br>";
elseif ($keglvl['Beer1'] > 100)
echo "<img src=\"/img/keg/full.png\" height=\"100\" alt=\"\"><br>";
else
echo "<img src=\"/img/keg/full.png\" style=\"", $keglvl['Beer1'], "\% alt=\"\"><br>";
?>
</div>
This sounds a lot like the sexy French woman in the movies...but I don't speak French! I just keep waiting for the part where she takes off her clothes. Haha.
Keep up the good work, guys/gals!
This!
I sometimes make my keezer pull double duty and act as my temp controlled fermentation chamber. Would it be possible, down the road, to add a temperature reading on the display?
What program are you using to code?
None of the local places here have more than a Chalkboard...
Notepad++
Hmmm... I'm on a Mac. That won't work from what I just read. I'll work on finding something else. Anyone else program of this type on a Mac?
I use fraise as my notepad alternative for the mac. It has basic syntax highlighting for the common languages.
You may want to make the switch to using a database sooner vs later. You'll need to set up a service to listen for the flow meter events as they come in and update the keg levels. If you switch to a db now, you'll have less rework later. Updating a db is a lot easier than updating a flat file.
Let me know if you want me to focus on a particular task, too. I don't want to step on your toes.
Hmmm... I'm on a Mac. That won't work from what I just read. I'll work on finding something else. Anyone else program of this type on a Mac?
I use notepad++ as well. I made a small update to the code, so the number of taps is not hard coded, but instead just uses whatever comes from the csv.
I agree with agenthubcap about stepping on toes. As of now there is only one front end page, and it's pretty small. If there are going to be more then one developer working, then we might want to figure out more of a development plan. So each work on a the different section. Or we could just go with one dev.
I would say it's up to thadius, since it's his project. I just don't want 5 guys working on the same thing and people getting pissed at each other.
Sent from my SCH-I535 using Home Brew mobile app
Enter your email address to join: