The Home-E lights aims at guiding the elderly every time they are out of bed and the colors of the lights specify the time of the day with an ambient effect

0

Project Vision 


Home-E lights are an ambient solution to guiding the elderly specially at night so that they prevent hitting objects on the way and are safely able to make it to their destination.

  • The lights will be switched on when the elderly person is trying to get out of bed. This will eliminate the need for them to switch on the lights in the dark
  • The lights will also serve as a ambient display of time
0

Bill of Materials


  • Neo-pixel Ring 24 X 500 RGB - 2
  • Potentiometer 1 K Ohm linear - 1
  • Premium M-M Jumper Wires
  • 220 ohm and 10k ohm Resistors
  • Particle Photon
0
  
0

Process - Lights 

We began with an intention of guiding the user specially at night and connected our lights to the pressure sensor in the bed. We did not want to intimidate the user, specially at night, with bright lights, which is why we chose to keep the lighting as ambient and soothing as possible. We then also reflected upon the disorientation elderly people have once they wake up not knowing the time of the day. So in our second iteration, we decided to add colors to the lights based on the time of the day. The lights then changes four colors based on the time of the day - Sunrise, Daytime, Sunset and Night time.

We used five Neopixel rings under laser cut housings to depict the lighting and used a potentiometer to depict the change of color with the time of the day.

0
#include "neopixel.h"

#define PIXEL_COUNT 24
#define PIXEL_PIN D1

#define PIXEL_TYPE WS2812B

#define PEACH 246,187,27
#define ORANGE 255,70,10
#define RED 255,0,0
#define BLUE 52,222,246
#define GREEN 125,246,49

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

int waitTime = 25;
//was 25
int i;
//int timepassed = 0;
//int inputPin = D0;
int ledPin = D0;
int ledState = LOW;
int potPin = A0;
int potReading = 0;

int calibrateTime = 10000;


void setup()
{
strip.begin();
strip.show();
//strip1.begin();
//strip1.show();

Particle.subscribe("justgotinbedmyhomie", inBedHandler);
Particle.subscribe("justgotoutofbedfool", outOfBedHandler);
Particle.subscribe("fallen", fallenHandler);
pinMode( ledPin, OUTPUT );
//pinMode(inputPin, INPUT);
}

void loop()
{

if(ledState == HIGH)
{
 setLED( HIGH );
 neopixelSpin();

}else{

 neopixelsOff();
 setLED( LOW );
}
//if(timepassed == 4)
//{
 //spin (RED);
//}
}

void neopixelSpin()
{
potReading = analogRead(potPin);
if ((potReading > 0) && (potReading < 1023.75))
{ spin (PEACH);
}
if((potReading > 1023.75) && (potReading < 2047.5))
{
  spin (ORANGE);
}
if((potReading > 2047.5) && (potReading < 3071.25))
{
  spin (GREEN);
}
if((potReading > 3071.25) && (potReading < 4095))
{
  spin (BLUE);
}
}

void neopixelsOff(){
for(i=0;i<PIXEL_COUNT; i++)
{
  strip.setPixelColor(i, 0,0 ,0 );
  //strip1.setPixelColor(i,0,0,0);
}
strip.show();
//strip1.show();
delay(waitTime);
}


void setLED( int state )
{
digitalWrite( ledPin, state );
}


void inBedHandler(const char *event, const char *data)
{
ledState = LOW;
}

void outOfBedHandler(const char *event, const char *data)
{
ledState = HIGH;
}

void spin(int R, int G, int B)
{
    for(i=0;i<PIXEL_COUNT; i++)
    {
    strip.setPixelColor(i, R,G,B);
    //strip1.setPixelColor(i,R,G,B);
    strip.show();
    //strip1.show();
    delay(waitTime);
    }

}
void fallenHandler(const char *event, const char *data)
{
for(int j =0; j<255;j++)
{ strip.setBrightness(j);
  for (int k=0; k< PIXEL_COUNT; k++)
  {
    strip.setPixelColor(k,52,222,246);
    strip.show();
    delay(waitTime);
  }
}
}
Click to Expand
0
Potentiometer - Changing lights according to the time of the day.
Img 1256 %281%29
0

Iterations and Reflections 

x
Share this Project

Courses

49713 Designing for the Internet of Things

· 25 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


About

The Home-E lights aims at guiding the elderly every time they are out of bed and the colors of the lights specify the time of the day with an ambient effect

Created

March 9th, 2018