Prototype/Outcome
Describe your experience/working prototype: What did you create, how, etc.? What tools and technologies were involved? Include appropriate content and illustration (e.g. a concept video, a video of the device in operation, diagrams, code, etc.) How does it relate or build on existing work (provide acknowledgements or cite this work). You should report this in sufficient detail that anyone knowledgeable with electronics etc would be able to reconstruct your implementation. Be sure to include a system diagram, annotated images, code, and a bill of materials.
For this project, I created a 3D printed flower case surrounding a lamp controlled by a relay. The proximity sensor on the Nano BLE would take in a number, and if the person was "away" during work time (according to the Pomodoro method), the code would instruct the relay to turn the lamp on and off to flicker rapidly, also creating a ticking noise through the relay. The lamp was then instructed to turn off after 25 minutes (not including "distracted" time) for 5 minutes and then repeat the loop. For the purpose of the demo, I scaled down minutes to seconds, so I could show the loop in under a minute.
I got the proximity sensor working using a simple circuit with the BLE Nano controlled by minimal code (also seen in Attribution and References):
I got the relay working and successfully controlling the lamp using this simple circuit (code also seen in Attribution and References):
I used SolidWorks to design the flower housing, but the final product was too large to print. After cutting up the design, I 3D printed it and ran into a few more challenges (discussed in process documentation) and came out with the following result after spray painting and attaching everything together:
To write the final code that controls the lamp, I combined my code for the proximity sensor and relay and created an algorithm to follow the Pomodoro method. I coded it so that the lamp would be on for 25 minutes to allow the user to work (flickering obnoxiously when the user gets up to leave) and then off for 5 minutes to not only encourage the user to take a break, but actually get up and leave their desk for a little while. Again, I ran into a few issues (discussed in process documentation) however after some debugging, I got it working! The demo is seen below after the final code, where I scaled down from minutes to seconds.