user2107733
Published © MIT

Make a WebServer with 3 Lines of Code!

With just 3 lines of code added to your Sketch, you'll have a complete IoT, Web Server with GUI Admin w/ File Manager and OTA Upgrading.

BeginnerProtip1,416
Make a WebServer with 3 Lines of Code!

Things used in this project

Hardware components

Wemos D1 Mini
Espressif Wemos D1 Mini
Any ESP8266 Based Board - One of my favorites. But, you can use a NodeMCU, ESP-01, ESP-07 or any of other flavor if you already have it and the proper programmer equipment.
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
Some way to connect it to your development computer
×1

Story

Read more

Schematics

Software Only

No schematic is required for this tutorial - It is meant to be used with any user project to provide a Web Interface to Monitor and Control any Hardware Project.

Code

Full Sample Implementation of InqPortal IoT, App, WebServer

Arduino
Discussed in Story
#include <InqPortal.h>
InqPortal svr;
double sine = 0;
double amplitude = 100.0;
void setup() 
{
 svr.publishRO("Sine", &sine, "Current Sine Value");
 svr.publishRW("Amplitude", &amplitude, "Amplitude Setting");
 svr.onInterval(calculate, 1000);
 svr.begin("MySoftSSID", NULL, "myRouterSSID", "myRouterPassword");  
}
void loop() 
{
}
void calculate(void*)
{
 sine = amplitude * sin((double)millis() * PI / 30000.0);
}

Credits

user2107733
0 projects • 3 followers
Contact

Comments

Please log in or sign up to comment.