Whipped Cream

HTTP topping for Raspberry Pi Gem Version Build Status Code Climate

Whipped Cream logo

Whipped Cream is a tool which does a couple of things:

  • Parses a simple plugin DSL to create web servers for Raspberry Pi I/O (input and output).
  • Creates and tests plugins on your computer.
  • Deploys plugins to your Rapsberry Pis.

It has a CLI (command line interface) command which parses a plugin:

name "Garage"

button "Open/Close", pin: 18

...and can start a web server:

$ whipped-cream start garage.rb

Whipped Cream screenshot

...which can be deployed to your Pi:

$ whipped-cream deploy garage.rb

Getting Started

Get a Pi

You'll need:

  • Raspberry Pi
  • Power adapter
  • 4GB+ SD Card

You might also want:

  • Solderless breadboard & jumper cables, for prototyping
  • GPIO breakout cable (Adafruit), for easily extending the GPIO pins to your breadboard
  • Mini USB wifi adapter, for placing the Pi anywhere in your house when you're done
  • A case for your Raspberry Pi

Install Ruby on your computer

Whipped Cream runs on Ruby 1.9.3 and above.


We recommend ruby-install for installing Ruby versions, and chruby for switching between them. RVM will also work fine.

You can also install Ruby 2.0 with Homebrew.


RubyInstaller for Windows


Most package managers have recent Ruby versions available. Try sudo apt-get install ruby1.9.3 or sudo yum install ruby1.9.3. You can also use ruby-install and chruby.

Install the whipped-cream CLI to your computer

That's right, we're still on your computer, not your Raspberry Pi.

gem install whipped-cream

Check to make sure everything works

$ whipped-cream demo
[2013-10-11 07:59:19] INFO  WEBrick 1.3.1
[2013-10-11 07:59:19] INFO  ruby 1.9.3 (2013-06-27) [x86_64-darwin12.4.0]
[2013-10-11 07:59:19] INFO  WEBrick::HTTPServer#start: pid=5351 port=8080

You should now be able to point your browser to and see the demo running.

Creating Plugins

Whipped Cream creates a web page which maps HTML controls to GPIO pins.


You'll want to use the pin numbering from the BCM chip (not the actual pin number, and not the WiringPi numbers).

GPIO pins

from HobbyTronics



Gets shown at the top of the page.

name "Garage"


Toggle a pin on or off.

switch "Light", pin: 24


Momentarily turn a pin on for 0.25 seconds.

button "Open/Close", pin: 18


Display something on the web page based on a pin's value.

sensor "Door", high: "Closed", low: "Open", pin: 23

Sensors can also be created with a block to show non-pin data.

sensor "Pi Uptime" do
  system 'uptime'


  • Run the tests with rake
  • Deploy to a Vagrant box with rake vagrant:deploy


Web UI designed by Ashton Harris.

Logo designed by Jeff Bloch.

Bitdeli Badge