Skip to content

Instantly share code, notes, and snippets.

@Aupajo
Last active December 14, 2016 06:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aupajo/501c719de8647320ebe2 to your computer and use it in GitHub Desktop.
Save Aupajo/501c719de8647320ebe2 to your computer and use it in GitHub Desktop.

Brewbot 🍻

http://petenicholls.com/brewing

Beer kit

You can get the basic equipment in a kit for ~$100, but probably cheaper if you shop around.

Book: http://www.fishpond.co.nz/Books/Brewers-Bible-Brian-Kunath/9780785828174

Two shops in Christchurch:

Annoyingly, both always seem to be closed on Sundays, which is usually my brew day.

Christchurch Home Brew Club has been very helpful: https://www.facebook.com/groups/494714937209424/

Honourable mention: http://shop.brewtopia.net.nz/ which has a lot of “clone” kits for well-known brews

Temperature sensor

Waterproof temperature sensor:

https://www.adafruit.com/products/381

I used the high temperature one, just for kicks:

https://www.adafruit.com/products/642

Arduino

https://www.arduino.cc/

Program with what is essentially C/C++ with a bunch of helper utilities and a custom IDE.

Important: If you're on El Capitan, you'll need to disable a part of the new System Integrity Protection to install an unsigned kext driver. Recovery restart vodoo can be found here. Ping me on Twitter or Ruby NZ's Slack if you need help.

The one I brought along was a Uno, which is a good general purpose one to play with.

Lots of cheap clones around (Jaycar tends to stock the Freetronics ones), which use the same chips and are generally just as good.

Amazing value Arduino starter kit:

http://www.aliexpress.com/item/RFID-Starter-Kit-for-Arduino-UNO-R3-Upgraded-version-Learning-Suite-Wholesale-Free-Shipping-1-set/1741165825.html

Adafruit lessons:

https://learn.adafruit.com/series/learn-arduino

Arduino WiFi shield:

http://www.aliexpress.com/item/WeMos-D1-WiFi-uno-based-ESP8266-for-arduino-Compatible/32455782552.html

Raspberry Pi

https://www.raspberrypi.org/

Essentially a ~US$40 Linux computer with a few pins for electronics.

Get a Class-10 SD card. You don't need much space.

I used Raspbian, which you can good install through NOOBs or by itself.

You'll probably want to pick up a wifi dongle.

Redis

http://redis.io/

Very easy to install and play with – have a go!

Rack

http://rack.github.io/

Final result (left unfactored):

require 'rack/request'
require 'json'

# Simple persistence
require 'redis'
redis = Redis.new

# Middleware example
require 'rack/contrib'
use Rack::JSONP

# `run` accepts any object that responds to `call` and takes a single argument, `env`
run ->(env) {
  request = Rack::Request.new(env)

  case [request.request_method, request.path]
    when ['POST', '/temperature']
      redis.lpush('temps', request.body.read)
      response = { ok: true }
    when ['GET', '/temperatures']
      response = redis.lrange('temps', 0, -1).map(&:to_i)
  end

  if response
    status = 200
    headers = { 'Content-Type' => 'application/json' }
    body = JSON.generate(response)
  else
    status, headers, body = 404, {}, 'Not Found'
  end

  [status, headers, [body]]
}

Other

LCD screen:

http://www.aliexpress.com/item/7-inch-LCD-Panel-Digital-LCD-Screen-and-Drive-Board-HDMI-VGA-2AV-for-Raspberry-PI/32314647847.html

Internet-enabled plug:

http://www.aliexpress.com/item/Orvibo-S20-Wifi-Cell-Phone-Power-Socket-Wireless-Timer-Switch-Wall-Plug-Phone-Wireless-Remote-Control/32518917123.html?spm=2114.01020208.3.1.F5Jn9U&ws_ab_test=searchweb201556_7_79_78_77_80,searchweb201644_5,searchweb201560_9

I drew the pixel art in my talk using Pixen for OS X, and the raw files as well as PNGs are available at:

https://github.com/Aupajo/pixels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment