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.
You’re going to need:
2 Arduino Unos
1 M Ohm Resistor
Conductive fabric, tape, or foil
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.
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.
For more detail: Come Home! Connecting Distant Spaces EASILY over Web using Arduino
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w