nightlight for plants

IMG_3316IMG_3319IMG_3317IMG_3318

 

IMG_3315Here is my finished nightlight!

My process started with the in-class code, and I soon realized that it would be easier to write my own code based off of this. In order to follow the procedure I wanted the lights to follow, I had to alter each section: display, logic, and sense.

I started with ‘sense’ because this was what would trigger all of the other steps.

Once the photosensor senses that it’s dark and/or the capacitative sensor was touched, I could move into the ‘logic’. This section would then break down the order of events depending on how many times the sense variables were changing, or even how strong the sense inputs were. Depending on either of these, events would follow. Specifically, a different light sequence each time the touch sensor was activated.

The ‘display’ consisted of the animations and fade sequences that would be used once the ‘sense’ and ‘logic’ loops were applied.

The finished code can be found here.

I worked on the code while simultaneously working on the laser cutter. I bought plastic several times, making the first prototype with incorrect measurements. I used the obligation of buying new material as an opportunity to revise my entire idea. I changed the code events multiple times, and the layout of the nightlight itself.

Leave a Reply

Your email address will not be published. Required fields are marked *