Back to Parent

Outcome


Img 0701.thumb
Show Advanced Options

Ambient Frosted Donut

My final iteration of the ambient orb - an ambient mini donut. The donut shape was made with a 3D pen to diffuse the light from the neopixel ring. This works with IFTTT to change color as a reminder for upcoming google calendar events.


Show Advanced Options

Process

When first working with the neopixels I wrote up a script for a particle function that accepts string based commands and parse them into different LED functions such as "ALL" (sets all pixels to given color), NUM: 1,5 (sets pixels 1-5 to given color) or STORE:1 (store given color at index 1 in pattern). A second particle function parses a a user string of RGB values formated as RRR,GGG,BBB to use with the given LED function.

This seemed to work well and I wanted to use it as a basis for the orb exercise as it would be a good demonstration of more complex user-programmable functionality from robust flexible functions. I could store a couple colors in a pattern and then fade between them when the notification triggers the pattern.  (Code below

However when attempting to get this running I had a lot of excess functionality making it difficult to test, I tried to streamline a bit and made a function explicitly for the red-white fade. Eventually I gave up and started a new file stripping away the generalized functions.

With the code stripped back I was able to trigger the white->red-white fade pretty reliably. I wanted to expand the code so it could flexibly handle other colors and attempted to use the constrain function and a variety of methods to calculate the time interval and increment for each color value. I also tried both struct and array based methods for color definition. I liked the variable naming of the struct but it made

Show Advanced Options

Reflection


This is not the first time even in this class where I overcomplicate things by trying to write more advanced code

Again I feel I need to be more realistic about the goal of the process- avoid optimizing functions I'm only using for simple tasks and make sure to iteratively build and test code I'm working on.

As with my experiences with other labs I do find the online particle IDE to be frustrating -causing the loss of work and making it hard to debug. I had tried the VScode environment earlier on in the course but I had forgotten how to work with it. This reminds me that it's worth taking the time to better utilize that environment.

Img 0704.jpg.thumb
Show Advanced Options
Show Advanced Options
Drop files here or click to select

You can upload files of up to 20MB using this form.