Skylight is a responsive frame. The main objective of this display is to illustrate a circle according to the distance of the user.
As the user moves closer to the frame, a bigger circle is added to it.
The frame has a neon glowing surface which has a memory for light, meaning the user will be able to see a glow of the circle on the display as it gets bigger.
LEDs are integrated on a rectangular part which is connected to a Servo motor. This motor rotates and with it the LEDs rotate also.
An Ultrasonic sensor is used to sense the user and to detect the distance of the user and the frame.
All the electronic parts are connected to a Arduino Uno board.
diagr
80
cm
60
cm
The radius of the glow according to the distan display. As the user move circle get
rams
40
cm
wing circle changes nce of the user and the es closer to the display the ts bigger.
20
cm
The outer shell has a neon surface which reacts to memory, meaning that it light as it Inside the display there Servo motor the LEDs rot the neon
n based semi-transparent o direct light and has a t can show a path of the t moves. e are eight LEDs. Using a tate and draw circles on n surface.
Fritzing illustration
CODE #define trigPin 7
#define echoPin 6
#define led 13
#define led2 12
#define led3 11
#define led4 10
#include <Servo.h>
Servo myservo;
int pos = 0;
void setup() {
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
myservo.attach(9);
}
void loop() {
long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
distance = (duration/2) / 29.1;
if (distance <= 80) {
digitalWrite(led, HIGH);
}
else {
digitalWrite(led,LOW);
}
if (distance < 60) {
digitalWrite(led2, HIGH);
}
else {
digitalWrite(led2, LOW);
}
if (distance < 40) {
digitalWrite(led3, HIGH);
}
else {
digitalWrite(led3, LOW);
}
if (distance < 20) {
digitalWrite(led4, HIGH);
}
else {
digitalWrite(led4,LOW);
}
if (distance > 80 || distance <= 0){
Serial.println("Out of range");
}
else {
Serial.print(distance);
Serial.println(" cm");
â&#x20AC;Š
for (pos = 0; pos <= 180; pos += 1)
myservo.write(pos);
delay(7);
}
for (pos = 180; pos >= 0; pos -= 1) {
myservo.write(pos);
delay(7);
}
} }
â&#x20AC;©
â&#x20AC;©
References
http://www.instructables.com https://www.arduino.cc