Come Home! Connecting Distant Spaces EASILY over Web using Arduino

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.

Come Home! Connecting Distant Spaces EASILY over Web using Arduino

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.

Come Home! Connecting Distant Spaces EASILY over Web using Arduino circuit

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

For more detail: Come Home! Connecting Distant Spaces EASILY over Web using Arduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top