Secret Light

by sofiaaronov in Circuits > Arduino

4579 Views, 44 Favorites, 0 Comments

Secret Light

Secret Light - Testing
IMG_4422 2mod.JPG
IMG_4417 2mod.JPG

"Secret Light" is an experimentation with soft sensors and circuits.

The visual represents a make, composed of several dots and lines: only by pressing at the same time the right 3 dots on the right line the light will light up, like a combination lock whose password is secret.

The whole project is composed by a copper fabric circuit, a soft touch sensor, an led stick and an Arduino Uno.

Designing the Maze

FullSizeRender-3.jpg
FullSizeRender-4.jpg
FullSizeRender-5.jpg
IMG_4385.JPG
Screen Shot 2016-10-22 at 18.45.34.png
Screen Shot 2016-10-22 at 18.47.02.png

The first step consisted in planning the visual maze base on which the circuit is then shaped.

Design Circuit and Sensor

580beb78937ddbddd8001233.jpeg
IMG_4399mod.JPG
IMG_4402.JPG
LockLight_bb.jpg

Once the layout is set, I planned the path of the circuit and the position and shape of the touch sensor, based on the "lock combination" position I chose. I soldered the edges of the copper fabric paths for more stable connections. At last I added a layer of Velostat on the sensor position, between the 2 layers of copper, one on the top printed layer, one one the back foam board.

The Code

Screen Shot 2016-10-22 at 18.56.29.png
Screen Shot 2016-10-22 at 18.56.43.png
Screen Shot 2016-10-22 at 18.56.53.png

I first linked the Adafruit NeoPixel Library to my sketch to control the led Stick.

Then I check that the sensor was properly read by the Arduino by initialising the console read.

I create two functions:

displayOff: controls the state of the light by linking its brightness to the sensor value.

displayOn: keeps the light on at all time until pressure happens again. A new variable is created (newSensorValue) to detect whether the pressure sensor is activated again. In that case the light switches off and the state become false.

In the loop function I execute displayOff of displayOn based on the values received by the console: if the value higher then 30, displayOn is executed. else DisplayOff.