So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By coreyweiss
#78783 Hi there!

I have a esp8266 module and I have successfully connected to a local web server on my wifi as well as created an account on adafruit.io where I can connect to my board via www. and do functions such as digital read and write.

My question is: Does a a www. platform exist where you can have the same freedom as a local web server to create custom input boxes and buttons that communicate to the esp?

For example, if I wanted to build a robotic arm that could type on a keyboard, I would have in my web server a text box. If I typed "hello world" in my text box, my arm would type out that word. Perhaps my web server would also have a timer and I could set my timer to 3 hours, exit the webpage and the esp would delay the typing output for 3 hours.

Are there any tutorials or projects you know of that have something similar that use a www. platform to interface their Iot device and do more than simple read and writes? I only see projects where people are reading sensor values or changing an analog value on a multi colour LED.

I'm pretty new to this world of web interfaces so excuse my terminology!

I'd love to hear your suggestions.

Cheers,

Corey
User avatar
By QuickFix
#78794
coreyweiss wrote:so excuse my terminology!

I'm afraid this is kind of important when trying to explain what you're trying to achieve.
I hear you say "www-platform", but www isn't a platform, it's just an abbreviation for "World Wide Web" and some domain-names start with it when you type it in the address bar of a browser (like www.esp8266.com).

In short, the www is a collection of servers and clients on a network ("The internet"): servers are computers that serve data (like pages and other information), clients are computers that ask data from servers.

The ESP8266 chip, modules and boards can act as both: you can make a server out of an ESP, you can also write code that will turn it into a client and it's even possible to write some firmware (this is the software you put into the ESP) that does both.

I'm not familiar with adafruit.io, but to me it seems like some sort of MQTT Server (or "Broker"): an intermediate server that shifts data between your ESP and (for instance) a browser.
In this setup, both your ESP as your browser act as clients: your ESP asks the (adafruit.io) MQTT server to accept some data and store it and optionally asks the server if there's data waiting for the ESP to retrieve, while your browser asks the server if there's any data, read this data and optionally sends some data (like commands) back for the ESP.

For a better explanation about MQTT, please read this Wikipedia article about it; it's much better than my short piece of text above.

As a MQTT broker concerns, the type of data it's handing is not relevant: as long as you give it the correct syntax and both your endpoints know what to do with the data, you can use it for anything you like: sensors, switches, lamps, displays, robot-arms: you're only limited by your imagination.

So yes: what you want is perfectly doable, but it will take some effort from your end.