Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Wifi communication using nodemcu esp8266

tapu

Full Member level 5
Full Member level 5
Joined
Sep 15, 2014
Messages
244
Helped
1
Reputation
2
Reaction score
2
Trophy points
1,298
Location
india
Activity points
3,145
Hi,
I want to send decimal numbers like 1,2,3 etc. from html webpage to nodemcu 8266 through Wifi and that number should be displayed on receiver side by 7 segment displays.But how to program or code to node mcu and make webpage to post numbers.please guide.

Thanks ,
Tepu
 
Esp8266 should receive data from wifi mobile app or html page.i want to send decimals from webpage and that should be received by nodemcu esp8266 and displayed on 7 segment display module.
 
How you do it depends on how the web page is published and how the mobile app is written. If the web page is published by the ESP8266 itself, it will be able to receive anything on a form structure (like icons or buttons) that are entered on it. If the web page is published by some other method, for example Wordpress, it becomes a bit more difficult because it has to know where to send the data back to, it needs to know how to communicate back to the ESP8266.

The problem is the limited internal memory on the 8266, you have to store the web page as well as the method to publish it and process the data for your display module. You can use external memory to increase its storage if a large web page or images are needed but you will quickly run out of space if you only use the internal memory.

You have to set up the ESP8266 as a web server, it isn't difficult, basically you configure the WiFi and send a HTML page header (fixed text) followed by the page drawing instructions. There are lots of examples on the internet. If you are connecting the WiFi through a router, you can 'port forward' the internal IP address of the ESP8266 to a public address so it can be accessed from anywhere. I recommend also binding the ESP8266 MAC address to a fixed internal IP address first so you always know which address to port forward.

If you want to use a mobile app rather than a web page, I recommend using a MQTT application. There are many available. With MQTT you can build a 'dashboard' with all the buttons, icons, sliders, graphs and sensors on it then use it to publish to a broker application. The broker can either process the entries itself or pass them on to some other device (your ESP866 display for example) to be used.

I use both methods, a large network of sensors and controls linked by MQTT and a broker running 'node-red' to link to the mobile phone network so I can monitor or control things from a normal web page.

Brian.
 
Quick and dirty way of getting a web server up and running is Tuniot :


1722336129806.png


https://www.youtube.com/@ADELKASSAH Many videos here on setting up Client Servers

You code in block language, Tuniot then converts that to Arduino Code, you cut and paste
into Arduino IDE Project, and program the ESP8266.

To get Arduino IDE to allow project selection of ESP8266 do this - https://randomnerdtutorials.com/how-to-install-esp8266-board-arduino-ide/

Lastly if you run into any performance issues consider using ESP32, which has more capability, memory, features, and
is dual core, which Tuniot supports.


Regards, Dana.
 
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top