Introduction: Smart Pills Box

Are you forgetting to take your pills?

Are you sure you took your morning pills?

Did you fall a sleep without taking your night pills?

Well we have the perfect solution for you!


Meet our smart box for pills:

Configure your pill-taking schedule digitally through the Blynk website.

When it's time to take medication, the smart box sends an alert to your Google Calendar and plays a pleasant melody as a reminder.

Throughout the day, the box visually indicates whether you've taken your morning and night pills. The LED lights on the box have the following meanings:

  • Green: You've taken the pill.
  • Yellow: You missed the pill within the specified time (remains yellow for one hour).
  • Red: It's been a significant amount of time since you last took the pill.

A dedicated button on the box signals to the system that you've taken your pills as required.

The box will shut down at 10 pm.

Supplies

ESP32, speaker, touch sensor, led strip, box to store pills, aluminum foil.

Step 1: Add the Touch Sensor

Attach the aluminum foil to the box along with the touch sensor. The aluminum foil will function as a button.

Establish a connection between the touch sensor and the ESP32 by linking a single wire to pin 4 on the ESP32.

Step 2: Add the Led Strip and the Speaker

Mount the LED strip onto the box, establish a connection between the LED strip and the ESP32 using pin 15, and connect the speaker to the ESP32 via pin 26.

Step 3: Decorate the Box

Wrap your box with paper, creating slots for the aluminum button and two LEDs from the LED strip.

Assign one LED to represent morning pills and the other for night pills.

Draw a sun for the morning pills Led and a moon for the night pills Led.

Step 4: Create Scenario in Make.com

Set up a user account on make.com.

Create a new scenario with two components: a webhook configured to receive HTTP requests and a Google Calendar component for creating new events in your calendar.

Ensure that the webhook is equipped to handle requests containing a parameter named 'value'.

Establish a filter between the two components, allowing only those whose 'value' parameter is equal to 1.

Step 5: Create a Template in Blynk

Generate a user profile in Blynk.

Develop a new template containing 5 datastreams, each assigned to a virtual pin.

Implement a web dashboard for editing the pill-taking schedule .

Create a webhook and connect it to the first virtual pin.

This webhook should dispatch requests to the URL associated with the webhook component on make.com.

The webhook should be configured to transmit a query parameter named 'value' and 'device_pinValue' as the value.

Step 6: Download Source Code

Retrieve the source code from Git and compile it for the ESP32.

git - https://github.com/uriwin/MedicineReminder

Step 7: Last Step

Enjoy :)