Remote Control - Mega with ESP

Hi,

I think I previously jumped the gun on this. I'm after some advice on the best method to achieve simple communication between two arduino mega boards with onboard ESP wifi.

My project:

I am wanting to create a handheld remote controller for an electric car. The range required would only be around 10 meters. I am unsure on the best way to achieve simple, reliable and fast communication between two Arduino Mega boards with built-in ESP8266.

There will be no router or an existing wifi network. I need one Mega / ESP to create its own wifi network (master) and the other to be able to connect to this as a client. Then the issue is how to pass basic ON, OFF (0,1) from one to the other.

Can anyone point me in the right direction with this?

Thanks

I never have used Arduinos with WiFi-onbboard through ESP8266.
But I have done some projects with pure ESP8266 boardsl ike the Wemos D1 mini.

If you need more IO-pins take a ESP826 nodeMCU

or a ESP32-board

The ESP-modules have a WiFi-based communication protocol called ESP-NOW.
This allows to send up to 250 bytes per message bidirectional between multiple ESP-boards.

ESP8266 has one ADC-channel.

The ESP32 has mutliple ADC-channels, some kind of RTC and more interrupts and PWM-pins.

These modules can be programmed with the Arduino-IDE after installing additional board-informations through a
special URL

If you don't mind spending some more money to buy such boards that is my suggestion to go.

best regards Stefan