Communicating between Arduino Uno WiFi Rev3 and ESP32

Hey, does anyone know how to transfer data from an ESp32 to an Arduino Uno WiFi rev3 through WiFi? I've done some research, but seems like there's very limited information on this topic.

#include <SPI.h>
#include <WiFi101.h>

void setup() {
  // Initialize serial communication:
  Serial.begin(9600);

  // Scan for available networks:
  Serial.println("Scanning available networks...");
  listNetworks();
}

void loop() {
  
}

void listNetworks() {
  // Scan for nearby networks:
  int numSsid = WiFi.scanNetworks();
  if (numSsid == -1) {
    Serial.println("Couldn't get a wifi connection");
    while (true);
  }

  // Print the list of networks:
  for (int thisNet = 0; thisNet < numSsid; thisNet++) {
    Serial.print(thisNet + 1);
    Serial.print(") ");
    Serial.print(WiFi.SSID(thisNet));
    Serial.print("\tSignal: ");
    Serial.print(WiFi.RSSI(thisNet));
    Serial.println(" dBm");
  }
}

Also, I was trying to just display the available Wi-Fi connections using the above code, which I uploaded to Uno WIFI Rev3, but I don't get any networks on the serial monitor. Am I doing anything wrong in here or maybe I'm using wrong library?

open a socket and send data ?

How can I connect both of them together at the first place. This is my first time doing wifi configuration so I needed some basic help. I gave the code in my topic, I first started by searching for available wifi networks but it didn't display anything on the serial monitor. I first need to get the correct library and also use it properly to achieve that. I know uno wifi rev3 is based on esp8266 but I'm not sure which library to use. Do you know the procedure to correctly connect them together for data transfer?

are they joining the same Wi-Fi network?

is this your arduino? ➜ https://docs.arduino.cc/retired/boards/arduino-uno-wifi

One will act as the server and the other as client so basically yes they will be connected on same network. I'm trying to control a RC car wirelessly so esp32 is on the joystick controller as the sender and uno wifi will be on the rc car as the receiver

I meant do you have an external (independent) WiFi network with a router and both Arduino are joining that network and getting an IP address from the router through DHCP or do you have one Arduino setup as a Wi-Fi access point and the other one is connecting to that WiFi network?

One will be setup as an access point and the other will connect to it, no external wifi. And here's the board im using it's same as the one shown in your link but it says r3 here.

But the front looks exactly like R2, I'm not sure why it says r3, I looked up and on the internet r3 is different than what I have so I think it's R2.

@Juraj I tried using wifinina but I get an error

it's a "developer edition"

not sure what that means in terms of libraries and firmware (probably 7 or 8 years old).

you would be better off using 2 ESP32... that board never got a lot of success

1 Like

@J-M-L oh okay...thanks for your help!

so you have this exotic board for which I am the expert.

put AT firmware into the esp8266 and then use my WiFiEspAT library. if you don't need UDP, then Jiri Bilek's 'fake' AT firmware is the best option.

I think I'll use UDP due to latency factor. And after I change the firmware, will I be able to access esp8266 and all of the Arduino I/O pins at the same time?

you will write sketches like for normal Arduino Uno. and these sketches can use WiFi with the WiFiEspAT library.

the AT firmware will not have the Web interface and OTA upload like the factory firmware. but the factory firmware can't do UDP and can only do TCP connection to port 80.

btw always have the board in the original plastic holder to not touch the bottom side of the board. there are some sensitive test points for esp8266 pins and touching them can make the esp8266 not responsive for some time.

1 Like

okay what if I use TCP, will I have a noticeable lag in communication between the remote control and the rc car for a maximum of around 20m distance?

compared to other WiFi option, the Serial communication with the esp8266 slows things down and the serial converter on the board can't go faster than 115200 baud.
but if the the data send are small, it shouldn't be much slower than WiFi directly from the esp8266

I can remember when you came to this forum after the dust between arduino.org and arduino.cc had settled.

yes Uno WiFi Dev Ed was my first Arduino. Before that I didn't know anything about MCUs. My last 8bit experience was Atari 130XE in 1991