Tutorial 13 - ESP8266 Wi-Fi Communication - ADA031-V5.0
Adeept · Uploaded · 6:56 · Watch on YouTube
Adeept shows how to fit an ESP8266-01S Wi-Fi module to the ADA031-V5.0 robotic arm controller and upload its server code. It then walks through connecting a computer to the controller's hotspot and sending text and button commands to the OLED display through a Processing GUI.
Transcript
Captions as a .vtt fileEmbed with the transcript
- 0:04This lesson introduces the ESP8266 wireless communication module and demonstrates its
- 0:11wireless functions with practical examples. Required components, robotic arm control board,
- 0:19USB cable, OLED display, ESP8266 module, battery. The ESP8266 is a wireless communication module
- 0:31developed by Espressif. Its Wi-Fi supports three operating modes, station mode, STA, access point
- 0:39mode, AP, and mixed mode. It supports two development approaches, AT command pass-through mode and
- 0:46standalone MCU programming mode. We use the ESP8266-01S module in this course. It comes pre-flashed
- 1:01with that firmware from the factory, so wireless communication can be controlled directly via AT
- 1:07commands. The robotic arm controller board has a dedicated socket for the ESP8266. Important notes.
- 1:25After installing the ESP8266 module, set the upload switch to position 0 for code uploading.
- 1:32Set the upload switch to position 1 when using ESP8266 wireless communication.
- 1:39Since the serial port and ESP8266 share the RX-D0 pin, this switch is designed to toggle between serial
- 1:48mode and ESP8266 mode. The matching client program is developed with processing. Before the demo,
- 1:57download processing and configure the environment. Go to the official processing website, download the
- 2:04corresponding installer and follow the prompts to install. Once installed, launch processing and
- 3:06install the Control-P5 library, which is required by our sample code. Let's start the demonstration.
- 3:48First, plug the OLED and ESP8266 module into the controller board, then connect the controller board to
- 3:56your computer with a USB cable. Connect the battery and turn on the power. The ESP8266 requires battery
- 4:04power to operate. Confirm the upload switch is set to position 0. Open the Arduino sketch for the robotic arm
- 4:13controller. Select the correct board and serial port, then upload the program to the controller.
- 4:28After successful upload, toggle the upload switch to position 1 and wait for the main controller to boot
- 4:47up. Connect your computer to the Wi-Fi hotspot named adept-ada031. No password is required.
- 5:02Once connected, open the client.pde source file inside processing. Click run to bring up the processing GUI.
- 5:30The top left corner shows Wi-Fi connection status. A green indicator means the connection to the
- 5:39robotic arm controller is established, and communication is ready. Type characters in the
- 5:45input box and press enter. The OLED display will show data sent from the client. You may also click
- 5:52buttons on the GUI with your mouse, received messages will also appear on the OLED. Code Principle
- 6:04Server Code. Configure and start the ESP8266 hotspot. Initialize the OLED screen. In the main loop,
- 6:14continuously receive pass-through data from ESP8266 and display it on the OLED. Client Code. Connect to
- 6:22the ESP8266 hotspot and establish a connection with the server. Initialize the processing graphical
- 6:29interface. When the user enters text or clicks buttons, the program sends data to the server.
- 6:36In this lesson, we have learned the communication principle of ESP8266. In later lessons, we will
- 6:44control the robotic arm using processing and mobile apps. All these functions are implemented based on
- 6:50ESP8266 wireless communication.
Discussion
A mail when somebody comments. No account needed.
The newsletter
Get our free newsletter with new robots, prices and robotics news.