Before going ahead with data upload, the local Wi-Fi router needs to be paired with Smart Wi-Fi. Use the following command to connect it to your Wi-Fi router:
call(“conenctap”,”your router SSID”,”your router password”);
This command will pair Smart Wi-Fi to the Wi-Fi router you want to connect with. The response will be the IP address assigned to Smart Wi-Fi by the router.
Open ThingSpeak_upload.lua file (given in DVD), type =call(“Thingspeak_upload.lua”) on the left side of Send and press Send. Data output on ThingSpeak API is shown as:
Error: Reference source not found.
The application code that will post data to ThingSpeak server (Fig. 7) is given below.
myKey = “put your API key here”
field1 = adc.read(0)/10;
call(“httpsend”, “api.thingspeak.com”, 80, “/update?api_key=”..myKey..”&field1=”..field1);
call(“connectap”,” your router SSID “,” your router password “)
tmr.alarm(1, 15000, 1, post)
Applications of Smart Wi-Fi
Smart Wi-Fi is an IoT-enabler tool.The applications it can cater to are only limited by the imagination of makers. The very basic applications could be for smart homes or smart offices.
This module can be used for data logging, data monitoring and more, and provides very good support for product development. It also has all features to act as a full-fledged product.
Using Smart Wi-Fi module, we have seen how easy it is to interface and connect sensors to the Internet. Tools like ESPlorer and open source LUA scripts make development very easy and fast. Platforms such as ThingSpeak add to the benefits and provide support for testing and development of an IoT product.