The popularity of the IoT has given rise to many basic WiFi-connected devices. Those devices, ideally, are very low-cost. For instance, a smart plug that turns a lamp on and off really isn’t practical if it costs more than $10. Thankfully, the venerable ESP8266 is ideal for the job. But, you still need a way to enter your WiFi credentials, and this LiFi method is perfect for that.
This method is great because it solves the surprisingly vexing problem of how to enter new WiFi details on a device with no keyboard or display. You can, of course, add those to an ESP8266. But, that increases the cost, size, and power consumption — undermining what makes an IoT device desirable. Eduardo Zola’s LiFi solution is the perfect alternative, because it allows you to enter new WiFi credentials using just an extremely low-cost photoresistor.
LiFi works by transmitting data with pulsing light. That means that all you need is a controlled light source and a way to detect and decode the light pulses. Your smartphone’s screen can be used as the light source, and an ESP8266 can decode the signal with a photoresistor that costs just a few cents. All you need to do is install the code onto the ESP8266, and use your smartphone to visit the webpage that translates your WiFi credentials into the light pulses needed to transfer them. It’s hard to imagine an easier or less expensive way to enter WiFi credentials on an ESP8266.