SkillsDev III - James Maffey

Made by jmaffey · UNLISTED (SHOWN IN POOLS)

I built an ambient calendar alert with a neopixel strip that is connected to my Google Calendar through IFTTT.

Created: December 3rd, 2021

0

Outcome

I took some creative liberty with this project. Instead of fading slowly from white to red leading up to the event (with this implementation the user doesn't know how soon the meeting starts), I had one LED change from white to red each minute leading up to the meeting. In this way, the user knows exactly how long he/she has until the meeting starts. 


In the demo video, I sped up the color changes so the video isn't 30 minutes long. For the actual implementation, I simply used a delay of 60,000 (rather than 1000, so that one LED changes each minute). 

I was successfully able to:

                              • Wire the neopixel
                              • Add the neopixel library
                              • Learn for loops and conditional logic
                              • Code the particle.function call so that the color change would initiate from the particle cloud
                              • Integrate IFTTT so that the color change would initiate 15 minutes before an event on my calendar
0

Process

The thing I struggled with the most was setting up the function call code. When I was learning how to use the neopixel, I used a loop. When it came to adding the function call code, I wasn't sure how to set up the logic. I had to do a lot of research and trial and error to get it to work.

It was a lot of fun to play with the lights and set them to do different things. There were libraries I added that could really make them work magic. 

0

Reflection

I feel empowered learning how to use IFTTT. I'm going to find so many ways this can improve my workflows. I spent too much time playing with this part of the project, even if it was the easiest part. 

If there is one thing I'd change, I would reduce the brightness of the LEDs so that they are more ambient and less jarring. 

0
SkillsDev III: Ambient Orb
TriXy737 - https://youtu.be/82ctUCWfZ94
0
#include <neopixel.h>

#define PIXEL_PIN D2
#define PIXEL_COUNT 16
#define PIXEL_TYPE WS2812

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


void setup() {
    strip.begin();
    
    Particle.function("red", setRed);
}


void loop() {
    uint32_t c1 = strip.Color(255, 255, 255); // white
 
    for( int i = 0; i < strip.numPixels(); i++ ){
        strip.setPixelColor(i, c1);
    }
    
    strip.show();
    delay( 100 );
}
 

int setRed(String color){ //functions for particle.function start with an int and take only string commands
  
    int rValue = color.toInt();  //first:convert string to number
    uint32_t red = strip.Color(rValue, 0, 0); //second: use the newly converted int to define color

    uint16_t i;
    for( int i = 0; i < strip.numPixels(); i++ ){
       strip.setPixelColor(i, red); // set a color 
       strip.show();
       delay( 1000 );
    }
    
    uint32_t c2 = strip.Color(255, 255, 255); //turning off by removing color
    for( int i = strip.numPixels(); i >-1; i-- ){
       strip.setPixelColor(i, c2); // set a color 
       strip.show();
       delay( 1000 );
    }
    
        return 1;
    }
Click to Expand
x
Share this Project

This project is only listed in this pool. Be considerate and think twice before sharing.


Courses

About

I built an ambient calendar alert with a neopixel strip that is connected to my Google Calendar through IFTTT.