I’ve decided to execute the key sconce idea! This also includes finalizing the interaction:
a.) if key is on handle:
- turn light on
- play tune on speaker
- animate light brightness to match with tune
b.) if key is not on handle:
- turn light off
c.) if key is on handle, but room is dark:
- dim light so it is a night light
Steps I took:
a.) Touch sensor with lights turned on. Code here.
b.) Melody combined with touch sensor and lights. Code here.
c.) Trying out ATtiny chip: Ran into issues with burning it.
d.) Fabrication side of things can be seen here: https://emilylinprocess.blog/category/subtraction-cutting/
* Writing a note because I always get stuck with timing in arduino:
– To have the beep last only 2 seconds even when touch sensor is pressed, use a counter.
– Example psuedo code:
// if button is on
// counter ++
// if counter < x time
// perform function
// else stop function
// else counter = 0
- This is my first time playing notes with Arduino, so I found some tutorials and links along the way:
- this was helpful for both programming ATtiny chip and the melody: https://www.instructables.com/id/Program-an-ATtiny-with-Arduino/
- I am also determined to use a ATtiny for this project! No more sacrificing my Arduino. Some resources to remember: