Remembering to take medication is one of the unspoken trials of normal college and university students across the United States. Many students majoring in cultural studies to engineering are often busy and struggle with the time management, punctuality, and fine details of everyday life tasks. Our team’s photon project utilizes three photon units to condition users to take medication when necessary.
The first step in how our prescription medication system works involves setting up contact sensors at the bathroom and bathroom cabinet door. These contact sensors sense whether or not doors are open or closed and are easy to configure. Our code references these sensors as LOW (closed) or HIGH (open). These outputs are then recognized in a while loop with if/else statements. For example, if the door reads HIGH then this status will be published and will be read by the cabinet door sensor - thus activating another door while loop but this time including the cabinet door sensor.It can be assumed at this point that the user will be smart enough to take their prescription medication because the cabinet door has been opened. However, because some of us can still forget, a third photon has been added inside the cabinet with an LED light. This LED light is subscribed to a HIGH cabinet door status and will flash. This flashing LED should alert the user to the medication in the cabinet and will then assume it has been taken.
The bathroom door photon is subscribed to both the cabinet door photon status and the LED photon status. The cabinet door photon is subscribed to the bathroom door and the LED light status. The LED light is subscribed to the cabinet door photon.
Once the medication has been taken, the cabinet door photon will send a notification to the bathroom door photon that it has been opened. The bathroom door photon also is set up to check if the LED has been on throughout a specified time period. If not, then the user will receive a notification that they did not take their medication. Everyday, the results of the published events from the LED photon are exported to a google sheets file, where the actions are plotted with respect to the date. This way, you can go back and check which days the cabinet was opened and the light was triggered and ideally, the days you took your medicine. Click HERE to view a live-stream of data.
Going forward, it may be beneficial to create hardware that supports waterproofing the photons as to prevent any moisture from interfering with the system. A weight sensor may also be beneficial in determining if medication was taken and how much. Alerts can be added when medication is low. All of these sensors are in an effort to condition those in need such that individuals can live healthier and happier lives.