0% found this document useful (0 votes)
66 views34 pages

Robotzero One Sending Data Esp8266 To Esp8266

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views34 pages

Robotzero One Sending Data Esp8266 To Esp8266

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

 Search …

Robot Zero One


Robots and Electronics

Home  ESP8266  ESP8266 Sending Data Over Wi-Fi to another ESP8266

ESP8266

ESP8266 Sending Data Over Wi-Fi to another ESP8266


Published: April 26, 2018 5:08 pm · Updated: June 8, 2019 3:25 pm · WordBot 37632  48 

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
A simple guide to sending data from one ESP8266 to another over Wi-Fi using an ad-hoc, device to device
network, without using a wi router.
The ESP8266WebServer library allows you run an ESP8266 as a basic webserver and access point. This can process data received from a remote
sensor over Wi-Fi without connecting the devices to a network or router.

For this tutorial I’m using two NodeMCU boards from eBay but you can do this with any ESP8266 based board. To simulate the output from a sensor
I’m using a trim pot potentiometer like these from eBay. I’m also using two small OLED screens from AliExpress so you can see the data easily but
you don’t need these if you want to see the results in the serial monitor.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
As you can see in the video below, when the potentiometer pot is adjusted the value shown on the transmitting module OLED changes to re ect the
change in voltage to pin A0. On the receiver, the value on the OLED is updated as the data is received from the transmitter.

You have been temporarily blocked


Pardon the inconvenience, but our servers have detected a high number of errors from your
connection. To continue, please verify that you are a human:

I'm not a robot


reCAPTCHA
Privacy - Terms

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
If you don’t have the Arduino IDE set up for the ESP8266 range yet you can nd a tutorial here – https://robotzero.one/heltec-wi -kit-8/ under Setting
Up the Arduino IDE for the ESP8266 Range.

I’m using these settings in the IDE (Tools menu) ..

The wiring is identical for both the transmitter and receiver except the transmitting device has the potentiometer connected to the power
and analogRead(A0) pins. You might need to connect the A0 pin via a resistor on some boards as they only read up to 1v on this pin.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
ESP8266 to ESP8266 Wi-Fi Wiring Diagram

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
ESP8266 to ESP8266 Wi-Fi Breadboard Layout

If it’s not installed already you will need to install the U8g2 display library (for the OLED) It can be installed using the Arduino IDE library manager –
open Sketch > Include Library > Manage Libraries and search for and then install U8g2.

Here’s the sketch for the transmitter. There’s a more verbose version if you want to see the output in the serial monitor or need to debug here.

#include <ESP8266WiFi.h>
#include <U8g2lib.h>

//U8g2 Constructor List - https://github.com/olikraus/u8g2/wiki/u8g2setupcpp#introduction


U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 5, /* data=*/ 4);

const char *ssid = "poopssid";

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
const char *password = "pingu4prez";

const int analogInPin = 0;  // Analog input pin that the potentiometer is attached to
int sensorValue = 0;        // value read from the potentiometer
int outputValue = 0;        // value sent to server

void setup() {
 Serial.begin(115200);
 delay(10);

 // Explicitly set the ESP8266 to be a WiFi-client


 WiFi.mode(WIFI_STA);
 WiFi.begin(ssid, password);

 while (WiFi.status() != WL_CONNECTED) {


   delay(500);
 }

 u8g2.begin();
 u8g2.setFont(u8g2_font_logisoso62_tn);
 u8g2.setFontMode(0);    // enable transparent mode, which is faster
}

void loop() {
 // read the analog in value:
 sensorValue = analogRead(A0);
 // map to range. The pot goes from about 3 to 1023. This makes the sent value be between 0 and 999 to fit on the OLED
 outputValue = map(sensorValue, 3, 1023, 0, 999);

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
 char intToPrint[5];
 itoa(outputValue, intToPrint, 10); //integer to string conversion for OLED library
 u8g2.firstPage();
 u8g2.drawUTF8(0, 64, intToPrint);
 u8g2.nextPage();

 // Use WiFiClient class to create TCP connections


 WiFiClient client;
 const char * host = "192.168.4.1";
 const int httpPort = 80;

 if (!client.connect(host, httpPort)) {


   Serial.println("connection failed");
   return;
 }

 // We now create a URI for the request. Something like /data/?sensor_reading=123
 String url = "/data/";
 url += "?sensor_reading=";
 url += intToPrint;

 // This will send the request to the server


 client.print(String("GET ") + url + " HTTP/1.1\r\n" +
              "Host: " + host + "\r\n" +
              "Connection: close\r\n\r\n");
 unsigned long timeout = millis();
 while (client.available() == 0) {

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
   if (millis() - timeout > 5000) {
     Serial.println(">>> Client Timeout !");
     client.stop();
     return;
   }
 }

 delay(500);
}

On the server (receiver) the sketch looks like this. Again, if you want a version with serial outputs to see more details you can download that here.

#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <U8g2lib.h>

//U8g2 Constructor List - https://github.com/olikraus/u8g2/wiki/u8g2setupcpp#introduction


U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 5, /* data=*/ 4);

const char *ssid = "poopssid";


const char *password = "pingu4prez";

ESP8266WebServer server(80);

void handleSentVar() {
 if (server.hasArg("sensor_reading")) { // this is the variable sent from the client
   int readingInt = server.arg("sensor_reading").toInt();

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
   char readingToPrint[5];
   itoa(readingInt, readingToPrint, 10); //integer to string conversion for OLED library
   u8g2.firstPage();
   u8g2.drawUTF8(0, 64, readingToPrint);
   u8g2.nextPage();
   server.send(200, "text/html", "Data received");
 }
}

void setup() {
 delay(1000);

 u8g2.begin();
 u8g2.setFont(u8g2_font_logisoso62_tn);
 u8g2.setFontMode(0);    // enable transparent mode, which is faster

 WiFi.softAP(ssid, password);
 IPAddress myIP = WiFi.softAPIP();

 server.on("/data/", HTTP_GET, handleSentVar); // when the server receives a request with /data/ in the string then
run the handleSentVar function
 server.begin();
}

void loop() {
 server.handleClient();
}

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Hopefully this tutorial helps you start o in the right direction with using Wi-Fi on these devices. I’ve seen other tutorials that made things a lot more
complicated than they need to be.

Buy Me A Coffee
If you liked this tutorial and want me to create more then please say thanks by buying me a co ee here...

 (Paypal)  €2

Or send me Bitcoin/Litecoin/Etherium 🙂

 Post Views: 37,632

Previous Next

 ESP8266 Built-in OLED – Heltec WiFi Kit 8 ESP8266 Fan Speed Control with DS18B20 Temperature Sensor 

Share this post

      

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
You may also like...

ESP8266 and BME280 Temp, Pressure and Humidity Sensor over SPI

Solar Peltier Mini Air Conditioner Experiment

ESP8266 Built-in OLED – Heltec WiFi Kit 8

48 Replies to “ESP8266 Sending Data Over Wi-Fi to another ESP8266”

dave
December 1, 2018 at 10:07 pm

Thanks for posting this.


I am trying to have ESP8266 units and send temperatures. one in the basement, one in the attic all to the one near the WiFi router. 2 sending, 1

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
receiving

REPLY

WordBot
December 3, 2018 at 4:25 pm

You’ll need to change the query string sent so the receiving ESP will know which one sent the data. Something like:
Basement ESP: ?sensor_reading_basement=
Attic ESP: ?sensor_reading_attic=

On the receiver you’ll need a smaller font to t everything on the screen and change the handleSentVar to listen to the two new variables above. This
system doesn’t use your WiFi, it runs on its own network.

REPLY

Mauro
December 12, 2018 at 10:36 am

Hi, is it possible to send sensor value from an esp8266 to an esp32 with the same technic ?

best regards

REPLY

WordBot
December 12, 2018 at 1:47 pm

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Yep. The data is sent as a GET request like this: /data/?sensor_reading=123 so any web server can parse the information and use it. I’m not sure
exactly which libraries you need but the ESP32 has equivalents to the ESP8266WiFi and ESP8266WebServer libraries.

REPLY

Alexander
January 1, 2019 at 9:03 pm

Hello! Could you help me a little bit? I just want to send an int value from one esp board to other.
I’ve connetcted a pontentiometer on the rst esp(Wemos D1 mini), and gets a value using map() function. I want to send it to the second board for
changing blink interval of LED.
I tried to change your sketch, but got no luck =(.

Thank you in advance!

REPLY

WordBot
January 2, 2019 at 1:01 pm

Hi there.
First check the simple blink sketch works:

void setup() {
pinMode(BUILTIN_LED, OUTPUT); // initialize onboard LED as output
}
void loop() {
digitalWrite(BUILTIN_LED, HIGH); // turn on LED with voltage HIGH
delay(1000); // wait one second

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
digitalWrite(BUILTIN_LED, LOW); // turn o LED with voltage LOW
delay(1000); // wait one second
}

If that’s OK then something like the following might work. I don’t have the project set up at the moment.

#include < ESP8266WiFi.h > //(remove spaces – wordpress comment workaround)


#include < ESP8266WebServer.h >

const char *ssid = “poopssid”;


const char *password = “pingu4prez”;

int varDelay = 1000;


int ledState = LOW;
unsigned long previousMillis = 0;

ESP8266WebServer server(80);

void handleSentVar() {
if (server.hasArg(“sensor_reading”)) {
varDelay = server.arg(“sensor_reading”).toInt();
server.send(200, “text/html”, “Data received”);
}
}

void setup() {
delay(1000);
pinMode(BUILTIN_LED, OUTPUT);
WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP();

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
server.on(“/data/”, HTTP_GET, handleSentVar);
server.begin();
}

void loop() {
server.handleClient();

unsigned long currentMillis = millis();


// if enough millis have elapsed
if (currentMillis – previousMillis >= varDelay) {
previousMillis = currentMillis;

// toggle the LED


ledState = !ledState;
digitalWrite(BUILTIN_LED, ledState);
}
}

REPLY

Alexander
January 3, 2019 at 12:43 pm

Yeah! =) It works. Thank you so much!

REPLY

kave
February 6, 2019 at 10:18 am

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
hi,
It`s very useful project
I need help for my project,
I want to send data via serial form ESP-12 to ESP-01 , That way one RC522 RFID connect to ESP-12 and read tag card and it should be send tag to the
ESP-01 with high speed like your project.
Thanks so much if you can help me 🙂

REPLY

WordBot
February 7, 2019 at 10:27 am

Hi,
Do you have the code for the reading the tag? In that code you just need to have it send the data in the same way the transmitter code above sends
data to the other ESP.

REPLY

Ron
February 12, 2019 at 6:06 am

Hi,

Thanks for the example. It saves me a lot of work/time nding out the wheel as I’m a basic electronics engineer and not a TCP/IP/HTML specialist. I’m
lazy and have replaced the potmeter for a random generator and the output is written to a serial monitor. All seems to work ne however in my
example I have contineously timeouts on client.connect() and client.available(). Any suggestions?

REPLY

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
WordBot
February 12, 2019 at 10:54 am

Hi,
At a guess I would say that there are too many connection attempts for the webserver in the ESP8266. Maybe try a delay() command in the loop to
slow down the connection attempts? Or if you are feeling brave you could try another webserver: https://github.com/me-no-
dev/ESPAsyncWebServer

REPLY

Tudor
March 6, 2019 at 7:07 pm

HI,
I try to do a project in which I have 2 transmitters and one receiver. Each transmitter has a switch and if I press the switch (from a transmitter or the
other transmitter) the LED on the receiver should go on. Could you please help me? Thank you.

REPLY

WordBot
March 6, 2019 at 7:46 pm

It shouldn’t be too hard. Both transmitters would have the same code that detects the button press and sends this in the URL “?sensor_reading=on”;
to the listening receiver. On the receiver you would set the LED high in the handleSentVar() function.

REPLY

Tudor

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
March 6, 2019 at 8:24 pm

Thank you. I am a beginner. Could you please help me with the code? I do not understand exactly which lines should I keep and which not.

REPLY

WordBot
March 7, 2019 at 10:29 am

If you are new to this you should break it down into small parts so you can understand what is happening so you can work with it later. The
rst thing you need is add a switch to the transmitter. The simplest way (not necessarily the best) is to pull the pin connected to the onboard
LED to ground with a your switch (or just connect D4 to GND with a piece of wire).

Then use the code below to see the change in the serial monitor:

const int button = 2; // D4/GPIO2 is connected to the internal LED (which is lit when the pin is LOW).
int pinState= 0;

void setup() {
Serial.begin(9600);
pinMode(button, INPUT);
}

void loop() {
pinState = digitalRead(button);
if (pinState == LOW) {
Serial.println(“LED Turned ON”);
delay(1000);
}
else {

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Serial.println(“LED Turned OFF”);
delay(1000);
}
}

REPLY

WordBot
March 7, 2019 at 10:34 am

Then you need to edit the code in the tutorialfor the transmitter so it sends the button state rather than the sensor reading something like this:

String url = “/data/”;


url += “?button_state=”;
url += pinState;

REPLY

Mitchell
March 9, 2019 at 7:19 pm

Hi, cool project with great info! I want to output the potentiometer reading via pwm instead of seeing the value on screen. Could you guide me on the
coding portion?

REPLY

WordBot
March 9, 2019 at 7:57 pm

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Do you have the code for the PWM part on the receiver? It shouldn’t be too hard to change the code in the tutorial to update the PWM code rather
than the screen.

REPLY

Mitchell
March 9, 2019 at 8:32 pm

No I have very basic understanding of programming. I usually troll tutorials such as this looking for code similar to what I need and then try to
stitch the bits together 🙁

REPLY

Mitchell
March 9, 2019 at 8:34 pm

I have your original code with the oled portions omitted on both mcu

REPLY

WordBot
March 10, 2019 at 9:10 am

I don’t really have time to look at this but if you ask on the forum here – https://www.esp8266.com/ someone will probably help. Tell them
how far you’ve got and what you want to achieve.

REPLY

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
hassan11
March 9, 2019 at 7:46 pm

can you help me i need code to send data between two esp32 , data from sensors in one esp32 to onther

REPLY

WordBot
March 10, 2019 at 9:17 am

The code should be mostly the same. You’ll need to use di erent libraries for the wi and wi server and possibly change the pins for the oleds if
you are using them.

REPLY

Arduino93
March 10, 2019 at 8:50 pm

i used this code to transmit the data from esp32 and they connected together but sensorValue still constant at “4095” in both esp32 , what should i do ?

REPLY

WordBot
March 11, 2019 at 9:37 am

Do you have code similar to this on the transmitter so you can see the output from the sensor:

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
// read the analog in value:
sensorValue = analogRead(A0);

// map to range. The pot goes from about 3 to 1023. This makes the sent value be between 0 and 999 to t on the OLED
outputValue = map(sensorValue, 3, 1023, 0, 999);

// print the results to the Serial Monitor:


Serial.print(“sensor = “);
Serial.print(sensorValue);
Serial.print(“\t output = “);
Serial.println(outputValue);

REPLY

Safei
March 12, 2019 at 10:22 pm

this code is work correctly with me ..


but i wanna send 5 values from esp instead of 1 value and save values in the other esp , what edits can i do ?
Thank you in advance

REPLY

WordBot
March 13, 2019 at 6:29 pm

So you want to take 5 sensor values and send them together? You can just make 5 variables to hold each one and send it like this.
url += “?sensor_reading1=”;
url += intToPrint1;

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
url += “?sensor_reading2=”;
url += intToPrint2;
etc…

Or maybe a tidier way is to put them all into one string, send that and process it on the other side. One way of sending strings:
https://randomnerdtutorials.com/decoding-and-encoding-json-with-arduino-or-esp8266/

REPLY

Safei
March 15, 2019 at 10:02 am

I already do this but it didn’t receive values in the other esp and it display “Client Timeout !” in serial monitor of transmitter esp …

Thank u very much for your support .

REPLY

WordBot
March 15, 2019 at 5:27 pm

Client timeout is not connecting to your WiFi. Try some of the ESP8266 Wi examples to get this working. It’s always best to start simple and
then add things bit by bit to check as you go. If you are new to this.. it’s much better to do that than try and edit a more complicated script to t
your case.

REPLY

Die y
April 3, 2019 at 4:25 pm

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
In your example the oled on the receiver is updating very quickly. I implemented the example code on two of my nodeMCU’s and I get a much slower
response time. Did you use a di erent code for the video? Thanks for the tutorial by the way.

REPLY

WordBot
April 3, 2019 at 4:38 pm

It’s the same script. In the tutorial there’s a version with more output on the serial port which might help diagnose. Someone in the comments said
theirs worked better with this line:
WiFi.mode(WIFI_AP);
added above this line:
WiFi.softAP(ssid, password);
in the receiver code but this isn’t in the examples code I developed this from.

REPLY

drdra
May 10, 2019 at 3:33 pm

Hey WordBot, thanks for your patience, can you tell me how can I send to multiple receivers?

REPLY

WordBot
May 11, 2019 at 8:29 am

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Looking quickly at this. If you take the part // We now create a URI for the request. Something like /data/?sensor_reading=123 and turn it into a function.
Then take this part // Use WiFiClient class to create TCP connections and do something like

const char * host = “192.168.4.1”;


const int httpPort = 80;
if (client.connect(host, httpPort)) {
// new function here
}

Once you have that working the same as the existing example you can then make it a loop that loops through the IP addresses you have for the
clients.

REPLY

Jeevan
May 14, 2019 at 1:51 pm

Hi

the project you have explained in a crispy and simple way thanks for the new thing which I learned from you.
But when I am trying to compile your code I am getting an error saying

WARNING: Spurious .github folder in ‘Adafruit Fingerprint Sensor Library’ library


WARNING: Spurious .github folder in ‘Adafruit GPS Library’ library
WARNING: Spurious .github folder in ‘RTClib’ library
In le included from C:\Users\KERNEL\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0/tools/sdk/lwip2/include/lwip/opt.h:51:0,

from C:\Users\KERNEL\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0/tools/sdk/lwip2/include/lwip/init.h:40,

from C:\Users\KERNEL\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/IPAddress.h:27,

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
from C:\Users\KERNEL\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:31,

from C:\Users\KERNEL\Documents\Arduino\NodeMCU_Transmitter\NodeMCU_Transmitter.ino:1:

C:\Users\KERNEL\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0/tools/sdk/lwip2/include/lwipopts.h:1301:2: error: #error


TCP_MSS must be de ned

#error TCP_MSS must be de ned

I am not getting this error what actually its saying. Please help me ,thanks in advance

REPLY

WordBot
May 14, 2019 at 1:55 pm

Your installation for the ESP8266 package is bad. How did you set up the esp8266 library? There’s a tutorial on this page for that:
https://robotzero.one/heltec-wi -kit-8/

REPLY

Deepanshu Kumar
June 7, 2019 at 9:43 am

Hey,
I’m trying to transfer values from one arduino UNO to other arduinoUNO using ESP8266. I ‘m in the process of doing the same but I’m not able to
transfer data neither I’m able to connect at the same HTTP address and port. For keeping program simple, initially, I’m trying to transfer a speci c value
of ‘temp’ to other ESP8266.

REPLY

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
WordBot
June 7, 2019 at 12:38 pm

Hi, Have you tried with the client IP as:

const char * host = “192.168.4.1”;

REPLY

Deepanshu Kumar
June 9, 2019 at 4:06 pm

Yes, I tried. The default IP which is being allocated to the client is “192.168.4.2”.

REPLY

WordBot
June 9, 2019 at 6:49 pm

Did you see the server example with more verbose output – https://robotzero.one/wp-content/uploads/2018/04/ESP8266-wi -receiver.ino
maybe this will help. Maybe paste your current client and server code at https://pastebin.com/ and I’ll try to take a look.

REPLY

Deepanshu Kumar
June 10, 2019 at 7:12 pm

Hey, thanks. I’m getting something better than earlier now. The client is printing the values. Server program still needs some editing.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
REPLY

Deepanshu Kumar
June 11, 2019 at 2:34 pm

I want to transfer GPS values from system 1 to system 2 using Wi-Fi module ESP8266 along with Arduino UNO. I’ve written the main codes
for server and client end. I’m not able to print anything on LCD if I’m using ESP8266 and selected ‘generic ESP8266’ boards. What could be
the issue?

REPLY

WordBot
June 12, 2019 at 8:35 am

Which LCD are you using? Try some of the examples for that LCD rst.

REPLY

Sarah
July 3, 2019 at 3:49 pm

Hi, I’m trying to set up 3 nodemcu esp8266 to be both client and server. Basically what it would do is, if ESP01 sense a motion it will turn on the led then
notify the other two esp that there is someone so that they could also turn on their led. At the same time, the ESP01 will also be ready for any incoming
noti cation that the other two esp might send. Do you have any idea to make this work?

REPLY

WordBot

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
July 3, 2019 at 6:37 pm

I’m pretty sure you can have client and server running on the same ESP8266. Think of them as a triangle. Each one sends to the other two it’s
connected to via their IP addresses. You could include in the message a code to say which device was triggered and the receiving device could ash
the LED in a pattern to show the device number.

REPLY

Sarah
July 3, 2019 at 10:51 pm

Thank you for replying.


Do you have any example that I can refer to?

REPLY

WordBot
July 4, 2019 at 8:56 am

I don’t have an example but you can look in the ESP8266 example in the IDE and hack something together. Another (possibly better) way to do this is
to use a mesh network: https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFiMesh

REPLY

Syira
July 5, 2019 at 5:52 am

Hi,
how to make one esp8266 ask another esp8266 to light up it’s led at a certain brightness.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
REPLY

WordBot
July 5, 2019 at 10:27 am

Hi, In the Arduino IDE: File>Examples>Basics>Fade has a very basic setup for controlling the brightness of an LED. You can use similar code on the
receiver from the tutorial above to control brightness. Search ESP8266 PWM for other tutorials.

REPLY

Leave a Reply
Your email address will not be published. Required elds are marked *

Comment

Name * Email *

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Website

Post Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow Robot Zero One

   

Most Viewed Posts

ESP32 Built-in OLED – Heltec WiFi Kit 32 (87,743)

Heltec WiFi LoRa 32 – ESP32 with OLED and SX1278 (74,614)

Ai-Thinker ESP32-CAM in the Arduino IDE (58,891)

ESP32-CAM | ESP32 Camera Module with Face Recognition (56,062)

Arduino UNO with Ai-Thinker RA-02 SX1278 LoRa Module (51,664)

ESP8266 Sending Data Over Wi-Fi to another ESP8266 (37,632)

ESP8266 Built-in OLED – Heltec WiFi Kit 8 (36,843)

ESP8266 and BME280 Temp, Pressure and Humidity Sensor over SPI (20,901)

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
New Tutorial Announcements

Email address: Your email address

Sign up

Search

 Search …

About This Site

Robots, electronics, Arduino and ESP micro-controller related information.

Buy Me A Coffee

If you liked a tutorial and want to say 'Thanks!' you can buy me a co ee here...

€2 

 (Paypal)

Categories

3D Printing

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Arduino IDE

Arduino Uno

Bluetooth

Electronics

ESP32

ESP8266

Face Recognition

JavaScript

K210

LoRa

MicroPython

Raspberry Pi

RISC-V

Solar

© 2019. All rights reserved.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD

You might also like