Ambient orb

Made by Tiffany Han

Create an ambient orb that changes color from white to red when it is 15min before any event starts on my google calender

Created: December 13th, 2023

0

Outcome

    • In this project I tried to set up an Neo Pixel ring to change color 15 prior if any events are starting on my calendar. 
    • Everything works except the IFTT webhook to particle platform because the request returns a 403 error and I don't really know why. I think it is issue with my authority code because I had a lot of trouble getting that and it was really sus. 
  • Below are a video demonstrating the color change when function is triggers on Particle console and the screen shot of the (not quite working) IFTT webhook. 

0
// This #include statement was automatically added by the Particle IDE.
#include <neopixel.h>
#define PIXEL_PIN D3
#define PIXEL_COUNT 16
#define PIXEL_TYPE WS2812

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

bool change = false;
unsigned long lastFade = 0;

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
  Particle.function("change", change_light);
}


int change_light(String command)
{
    int b = command.toInt();
    if (b == 0){
        return -1;
    }
    else{
        change = true;
        // uint32_t new_color = strip.Color(120, 0, 0);
        // c = new_color;
        return 1;
    }
}

bool tored = false;
void loop() {
  uint16_t i;
  //sets color to white
  if (change == false){
      uint32_t color = strip.Color(100, 100, 100);
      for(i=0; i< strip.numPixels(); i++) {
        strip.setPixelColor(i, color);
		strip.show();
		delay( 100 );
    }
  }
  
  else{
    if (tored == false){
      Particle.publish("here");
      int r = 100;
      int g = 100;
      int b = 100;
	  uint32_t color = strip.Color(r, g, b);
	   for (int i =0; i<60; i++){
	       b =  b - round(100/60);
	       g = g - round(100/60);
	       color = strip.Color(r, g, b);
	       for(i=0; i< strip.numPixels(); i++) {
                strip.setPixelColor(i, color);
		        strip.show();
		    }
	       delay(1000);
	   }
	   tored = true;
	   change = true;
	}
	else{
	  Particle.publish("here");
      int r = 100;
      int g = 0;
      int b = 0;
	  uint32_t color = strip.Color(r, g, b);
	   for (int i =0; i<60; i++){
	       b =  b + round(100/60);
	       g = g + round(100/60);
	       color = strip.Color(r, g, b);
	       for(i=0; i< strip.numPixels(); i++) {
                strip.setPixelColor(i, color);
		        strip.show();
		    }
	       delay(1000);
	   }
	   tored = false;
	    
	}
        
    }
     
	
}
Click to Expand
0
IMG 1270
Tiff467 - https://youtu.be/jq3YBIeD40o
0

Process

I first started by creating a circuit with a neopixel. Then, I set up a function that lets me change the color to red using the Particle Console. After that is done, I modified the function to let the color change within 1 minute. Then I setup the IFTTT webhook and links it to my particle. 

I was able to setup everything succesfully, but when I tested it with a calendar, the request did not go through. I don't really know why. A request was made and the action was triggered, but it seems the particle side didn't accept the job correctly. If I had more time I would try to fix this, perhaps with help. 

x
Share this Project

Courses

48-675 Designing for the Internet of Things 24

· 11 members

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


About

Create an ambient orb that changes color from white to red when it is 15min before any event starts on my google calender