49713 Designing for the Internet of Things
· 25 members
A hands-on introductory course exploring the Internet of Things and connected product experiences.
An ambient device that helps you maintain healthy sleep pattern if you care about your fish!
Today we are spending too much time before sleep almost doing nothing but scrolling our timelines for hours before we fall asleep. Disturbed sleeping pattern does not only affect our sleep quality, but our overall productivity through the whole day as well. The intention of this project was coming up with a device that helps/motivates a student or an employee keep track and maintain a healthy sleeping pattern.
You go to sleep at 9 pm for instance, the time is recorded until you wake up and the duration is recorded as well. Sleeping at 9 for 8 hours guarantees a continuous oxygen supply for your fish. Later than 9 or less than 8, you start decreasing your fish oxygen supply gradually until you completely kill it.
1. Photon Particle
2. Bread board
3. Jumping wires
4. Pressure sensor (FSR)
5. DIMINUS DC 6V Mini Air Pump Motor
6. Bottle (acting as a container for the fish)
7. 7 flexible transparent tube
8. A fish
int prePin = D1;
int motorPin = D6;
int sleepTime = 0;
int a = 0;
int b = 0;
int Start_sleepTime = 0;
int End_sleepTime = 0;
int lag = 0;
int value = 0;
unsigned long lastTime = 0;
int state = 0;
int excute = 0;
void setup(){
Time.zone(-5);
Serial.begin(9600);
pinMode(prePin, INPUT);
pinMode(motorPin, OUTPUT);
}
void loop(){
int tTime = Time.hour();
if(tTime >= 22 and tTime < 24){
int preState = digitalRead(prePin);
if(preState >= 4096 and state == 0){
state = 1;
a = 25- tTime;
Start_sleepTime = Time.hour();
delay(100);
}
}
else if(tTime >= 0 and tTime <3){
int preState = digitalRead(prePin);
if(preState == 1 and state == 0){
state = 1;
a = 1;
Start_sleepTime = Time.hour();
delay(100);
}
}
else if(tTime >= 3 and tTime <= 6){
int preState = digitalRead(prePin);
if(preState == 1 and state == 0){
state = 1;
a = 0;
Start_sleepTime = Time.hour();
delay(100);
}
}
else if(tTime > 6 and tTime <= 10){
int preState = digitalRead(prePin);
if(preState == 0 and state ==1){
state = 0;
End_sleepTime = Time.hour();
delay(100);
}
}
else if(tTime > 10){
if(excute == 0){
int preState = digitalRead(prePin);
if(preState == 1){
b = 0;
}
if(Start_sleepTime >6){
sleepTime = End_sleepTime - Start_sleepTime + 24;
}
else{
sleepTime = End_sleepTime - Start_sleepTime;
}
if(sleepTime == 5 or 6){
b = 0;
}
else if (sleepTime == 7 or 8 or 9){
b = 2;
}
else if (sleepTime == 10 or 11 or 12){
b = 1;
}
value = a*b;
excute = 1;
}
else if(excute == 1){
if (value = 0){
digitalWrite(motorPin, LOW);
}
else if(value == 1 or 2 or 3){
digitalWrite(motorPin, HIGH);
delay(5000);
digitalWrite(motorPin, LOW);
delay(10000);
}
else if(value == 4 or 6){
digitalWrite(motorPin, HIGH);
delay(5000);
digitalWrite(motorPin, LOW);
delay(100);
}
}
}
}
Click to Expand
One thing we felt about this project, is that from a designer perspective, everything sounds like a good idea and a promising device. It’s always fun to come up with the craziest ideas at the beginning. However, during implementation and user testing, new challenges arise and let us question not just our concept but also shows how narrow it is the window from which you can create a product that will actually last.
A hands-on introductory course exploring the Internet of Things and connected product experiences.
An ambient device that helps you maintain healthy sleep pattern if you care about your fish!
February 7th, 2018