Embedded Programming


Ever experienced losing your friend in a crowded techno club only to find them with their new friend group that they like better than you 12 hours later?



Fear not, because, for this assignment, I am making the ultimate find-my-lost-friend paired device using ESP32.



Find Lost Friend In The Club Device


I started with some quick research about RSSI (Received Signal Strength Indicator). From the stack overflow pages, it seems that ESP32 used to give developers problems in finding the readings of RSSI in the past. But no longer so. As a matter of fact, it looks like the Arduino’s own example library contains the very code I require. Convenient!



Works like a charm.


Now, what’s left is a nice smooth blinking indicator to show my distance to the peer device.


Blinking Indicator




I use ESP32-C3’s pinout diagram to connect a simple LED, testing it out with Arduino’s basic Blink example.



Making the blinking consistent turns out to be a challenge. Every time ESP32 goes to look for an available peer network, there is an associated delay that messes up the blinking pattern. Ideally, you’d just want to blink once to the retrieved RSSI, and then proceed to retrieve the new RSSI. However, the process of looking for network with a too little of delay causes failures. My approach for this version was to find a sweet spot with a minimal delay in blinking. In future, multi-threading would be the perfect solution for this.


Results: