loading

Visit blinkblinkstem.com for more projects like this!

Can you believe that we live in an age where you can touch an object (any object - if it has metal on it) and a light will turn on in your loved-one's space - even if they live in a different city, state, or country!? You could tell your loved ones or friends when you're missing them, or when dinner is ready. The world is yours!

We're going to show you how to connect spaces using an online websockets connector called Spacebrew. Spacebrew is easy to use and free!

In this Instructable you were going to learn how to connect distant spaces via Arduino, Processing, CapSense, and Spacebrew. If you've never heard of some of these programs/libraries, don't worry. We'll step you through it and we're providing commented code to help you along.

We're going to show you what we did, but you can feel free to make your own inputs and outputs based on your own needs.

You're going to need:

2 Arduino Unos

1 M Ohm Resistor

Conductive fabric, tape, or foil

Aligator clips

Jumper wire

1 Breadboard

1 LED

Arduino IDE

Capsense Library for Arduino

Processing IDE

Spacebrew Library for Processing

Step 1: Setting Up the Arduino

You're going to want to configure your Arduino Uno first and download the Capsense Library.

You're going to want to connect an alligator clip to the wire connected to your resistor. Attach conductive tape, foil, or any other highly conductive material to the other end of the alligator clip. This will function as your versatile sensor. You can attach this to any object and with the Capsense library it will become your sensor.

Here's the Capsense Library. You'll need to download it and put it in your Libraries folder. delete the "-master" part.

Here is the Arduino code (LINK)

Refer to the code as to which pins you should place your wires in.

I made a piece of paper that says "Come Home" and cut a hole in the paper to reveal my copper tape/capacitive sensor. When I touch the copper tape, the value "true" will be sent over Spacebrew to a receiving Processing sketch that will turn on the LED on the receiving computer's end.

Step 2: Make Arduino and Processing Talk

Currently, Spacebrew, (the toolkit needed to connect the distant spaces over the internet) does not take messages directly from Arduino. We're going to need the Capsense library to be running on the Arduino (which is why we can't use standard firmata) and sending the input from the Capacitive sensor so we're going to import processing.serial* library, and send our values from the Arduino, via serial communication, to Processing.

You'll also import the Spacebrew library for Processing. As the code is currently set up, when the capacitive sensor reads that you're touching the sensor, it will send "true". This processing sketch and the processing sketch on the other side (output side/ your loved one's side) will connect via spacebrew, and the output sketch will light up the LED when it received "true". Read through the sketch's comments to see how it is working.

Spacebrew Library for Processing

Processing Sketch

Step 3: Arduino and Led on OUTPUT Side

You'll want to set up the receiving Arduino now. It's extremely simple. Just attach the ground (shorter leg of your LED) to ground using copper tape and alligator clips or wire, and the power (longer leg of your LED) to pin 13 on your Arduino. You're good to go.

Step 4: Receiving the Input

So now you'll be working on the Processing sketch that will receive the messages from the Capacitive Sensor on the other side - the output side. We chose to make a project that lights up an LED on a building when the the input capacitive sensor is touched and the "true" value is received via Spacebrew connection.

Here is the link to the output/receiving Processing sketch.

Step 5: Connect the Two Processing Sketch in Spacebrew

1. Run the Output processing sketch

2. Run the Input processing sketch

3. Connect the two notes on Spacebrew's public spacebrew session (LINK)

4. VOILA! Now when you touch your capacitive sensor on one end, the "true" value is sent over Spacebrew to the computer and by extension Arduino on the other end and your LED lights up!

Visit blinkblinkstem.com for more projects like this one!

<p>Wooooow super nice project! Lovely! :D</p><p> Is it possible make it with an arduino uno and with a leonardo? I'm not an expert, what I should modify in the code?</p>
<p>Cool, congrats on the win!</p>
<p>If you used a servo instead of a led light, you could could make a version of the Weasley family clock. </p><p>Touching the capacitive link in a location would let you update the central clock server.</p>
<p>Very clever! Thanks for sharing this.</p>

About This Instructable

3,907views

46favorites

License:

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: