Solving a real-world problem

Solving a real-world problem

Ever since I started programming, I have learned from my surroundings that people want to solve real-world problems, help society, and make an impact. Watching this, I also felt like I always wanted to create apps or software that make real-life impacts and help people or communities. But I don’t think I was ever able to do that(except making a to-do app for my 17 followers).

Last month, I was working remotely and was out of home. I live with my family. My parents were also out of town leaving my grandmother and differently abled uncle alone in the house. Now my grandma suddenly got ill overnight but she doesn’t to how to make calls (she just knows how to receive them). Due to this, we were not able to get informed on time. Though she is recovering now, I could foresee this situation coming in the future as well. So I wanted to do some solution for this.

I had a microcontroller from one of the past experiments. I made an LED light toggler using Google Assistant and IFTTT(see video below). Now I was not using that microprocessor, so it was available for the next side project.

Video Link: https://www.youtube.com/shorts/RyZEOIIeOXc

I had in mind that I wanted minimum interaction from my grandma, so I was looking at my options. Initially, I was thinking I could make a switch that could be connected with pins on the microcontroller and upon pressing I get some kind of notification. By now I was thinking along the lines of mobile notifications or email.

As I gave thoughts on it, I figured we could run a script on boot and use some API/webhook for the notifications. Now the problem was using the microcontroller. The last time I used this device was almost 2 years ago. I forgot what tools I even needed to run this. Experimented a little around and went with Arduino IDE.

The library last time I used to connect my node mcu 8266 was not working anymore. i was not able to connect to my microcontroller. With some debugging and spending a day on it, I was able to connect to the microcontroller. (after uninstalling and installing Arduino IDE). The next task was checking if everything was working or not, So I used IDEs example programing to run. The blinking program was running fine so I went ahead with the task. I tried LLM’s to code and help me connect with my home wifi and then pushing notifications to my phone. The connecting part was working fine but the network requests were failing. I tried to use multiple services, pushbullet, pushnotifications, telegram bot, etc. none of them were working.

The next day, made an express route and tried sending a request there was well. Even that was failing. Upon this, I figured out that the library I was using in the code was not working. So I went to the internet and searched. Eventually, I found a library with which I was able to send GET requests and with a few modifications, POST requests as well.

here is the github repo where I found the code: https://github.com/hoshmandent/POST-request-Arduino/blob/main/main.ino

Once the requests on my local server were coming, I tried with pushbullet as well. and there it was, a successful request. I was able to send notifications to my phone from a piece of hardware. I did further modification and modified the script such that, only starting the microcontroller will send me notifications. So that grandma needs no interaction with the device, just turn on the 5v power supply (which is a phone charger in my case) button and I’ll get a notification.

Watch the end product demo video below(ignore the background talk).