Skip to main content

Interactive Object: Progress 1

 This week I worked on the code for this project and created the graphics for the top of the object. I am also planning the object's design, as I have decided to 3D print it.

I think I have settled on the size and style of the object, which is a simple circular container with a lid. What I am still stuck on for the object is how to incorporate a button. I kind of want to have an oversized spring-loaded button, but I'm not sure how to incorporate that into the object. It could either be in the centre of the object, or it could be below the neopixels on the lid.

Sketches for box size and style:


Here is the graphic I created for the words on the object:

The code for the light circling the object is working. I now need to figure out to get it working with a button. Based on what I have been reading it might be best for the button to change the 'state' of the neopixel, but I don't totally understand how to incorporate that with my current code. The reason I need the state to change is I want the colour of the circling light to change to match the stages of the graphic (see above). What complicates this is I also need the button to pause the light where it is first, then change states on a second push.

Here is a video of the light 'circling' the neopixel:

Here is the code I have right now, I have figured out that the for statement I was trying to make for the button isn't going to work. I was looking at this example from adafruit for a way to potentially do what I need to do.


I hope to get my code fully working, and my object 3D designed by the next class. For the proof of concept, I plan on printing the graphic and sodering the neopixel ring (when I get it) and likely using the kit button with it to show the concept.

Comments

Popular posts from this blog

Interactive LED Circuit

 This week I applied some of the in-class coding lessons to an interactive LED Circuit. My main idea was to create a system where half the LEDs go off and once interaction happens the other half would go off. In the simple example, I created this week, the 1st, 3rd, and 5th light go off together in a row, then the 2nd and 4th go off together once the potentiometer changes reading. I found success in creating what I wanted to for this week, though I certainly see the potential for similar code to be used on a larger and more complex scale. For more on that see the end of the post. The challenges I encountered were mainly associated with knowing how to order the code for it to work properly. I knew all the pieces necessary for this idea to function, but I wasn't sure what had to happen first. Once I was able to figure that out, the code worked well. The only problem that remains is the last LED in each light sequence doesn't fade in and out, it just flashes on. I still don't ...