For this assignment, I created a prototype of a touch lamp that has the functionality that allows the user to schedule and automatically adjust the brightness based on the current time, based on their lifestyle. For example, there is a user who studies everyday 6-9pm, reads book/get ready to go to bed 9-12am, and sleep 12-8am everyday. The user will want a study lamp while studying, a reading/bed lamp while reading book on the bed, and a night lamp while they sleep before the sun rises. This lamp I designed can adjust the brightness based on the time schedule set by the user, and when the user turns on the lamp with the touch sensor, the lamp will set the brightness based on the hour when the user turned it on. Then, when left on, the lamp will automatically change the brightness. Below is the low-fidelity prototype of a possible usability scenario I drew.
The arduino set up I had for the assignment was basically the same as the touch sensor setting. For the code, I imported two libraries called Time Library and DS1307RTC Library to get the current time.
The basic logic of the code is to check the current time when the lamp is turned on, and if the time equals to a certain hour (ex. 4, 9, 14), set the brightness of the LED to a certain value. Below is the code I wrote.
The aluminum foil worked as the touch switch for the lamp. The LED did not successfully follow the algorithm of the code however, and I tried to debug the code while making sure each part of Arduino was connected. Although I thought the code and hardware seemed simple enough, as it was my first time using Arduino, it was not a familiar process. Next time, I think I will make sure to give enough time for the debugging process.