Hi all,

In this Instructable we're going to detail how you can use Spacebrew toolkit to connect your smartphone (via its built in accelerometer) to manipulate aspects of your openFrameworks sketch.

We created an installation and allowed participants to shake a cell phone to change the size and shape of an oF mesh sketch. However, participants could easily just load the page on their own wifi/3G enabled device to manipulate the sketch's variables.

You will need the following:

  1. a smartphone with accelerometer (iPhones and Androids work just fine)
  2. SpaceBrew Library for openFrameworks (two links) __> 1 2
  3. openFrameworks (we give an example sketch)
  4. a web hosting site of your choice
  5. basic html and css knowledge (we give an example!)

Step 1: Download Spacebrew libraries for oF

1st library : ofxLibwebsockets

2nd library: ofxSpacebrew

Implement them in your openFrameworks sketch however you like, but we used oF's Project Generator and selected these in the "addon" menu. It is a really easy way to seamlessly put addons in your sketches.


Make sure you follow the directions on the GITHUB READMEs for both of these libraries. You have to delete a line to use the Project Generator. It's not hard, just easy to overlook.

About This Instructable


18 favorites


Bio: We're a group of designers, coders, and makers -- Alex Tosti, Lucy Matchett, Nicole Messier, and Joselyn McDonald. We enjoy physical computing, coding, Snacks, Our ... More »
More by Snax_and_Macs: Come Home! Connecting Distant Spaces EASILY over Web LED Felt Carrot with Soft Circuits Connect Arduino to Open Frameworks via Bluetooth
Add instructable to: