In my previous instructable I made a WiFi communication between two ESP8266 MCUs through a home WiFi router. As I saw from the comments there are Makers who would like to use ESP8266 MCUs far from the range of a router. So here is a bare minimum instructable about an accesspoint - station communication which don't needs WiFi network.
Step 1: What Do You Need.
Things you need:
- 2 pcs ESP8266 based MCUs e.g. Wemos D1 mini
- 2 pcs micro USB cables
- and a PC with Arduino IDE
Everything you have to do:
- Download the attached sketches
- Open them in two independent Arduino IDEs
- Upload them into two ESP8266 MCUs.
The AP has a fix IP address eliminating the IP conflict with your other projects.
The station uses this predefined IP to connect to the AP. The station triggers the AP with a message and the AP answers it.
Opening the serial monitors of each running Arduino IDEs you can see the flow of the messages and answers.
The built in LED flashes during the communication. It is only visualization you can eliminate flashing if you don't like it.
Step 3: How to Open Independent IDEs
How to start two independent Arduino IDEs?
- At first click on the accesspoint_bare_01.ino. It will open the first Arduino IDE.
- Connect the first MCU.
- Set the new port appears in the Tools->Port menu to the first MCU.
- Upload the sketch. It will be your accesspoint.
- After that go back to the downloaded sketches and double click on station_bare_01.ino. It will open the second Arduino IDE.
- Connect the second MCU.
- Set the new port appears in the Tools->Port menu to the second MCU. (If your IDEs are independent then port will not change in the first IDE window.)
- Uplod the sketch. It will be your station.