Template: WAVEGO Guides

From Waveshare Wiki
Revision as of 10:20, 16 March 2022 by Waveshare-eng11 (talk | contribs)
Jump to: navigation, search

Assembly Guide



WAVEGO Developing

Note: The provided ESP32 board has been flashing, you can just assemble and use it as the video. This guide is provided for the users who would like to modify the codes themselves.

Install Arduino IDE

  • Download the Arduino IDE from Arduino.cc website.
  • Please choose the Arduino IDE version according to your OS
  • Download and install the IDE according to the prompt.

Install Arduino core for the ESP32

  • Run the Arduino IDE,点击File。


  • Click Preferences。



  • Restart the IDE, choose Tools > Board > Boards Manager, to open the Boards Manager。
  • Entuer ESP32 to search the library and click Install。


  • Wait for installing


  • After installing, you can use the Arduino IDE for developing the ESP32 board

Download demo code and dependency libraies

  • You need to install libraries below by the Libraries Manager:
    • ArduinoJson
    • Adafruit SSD1306
    • Adafruit PWM Servo Driver Library
    • ICM20948 WE
    • INA219 WE
    • Adafruit NeoPixel
  • Click Tools > Manage Libraries to open the manager.


  • Type the library in the search box, find the correct libraries and install them.
    • ArduinoJson
    • Adafruit SSD1306
    • Adafruit PWM Servo Driver Library
    • ICM20948 WE
    • INA219 WE
    • Adafruit NeoPixel
  • Instal or update the library.

QQ截图20211130135130.png QQ截图20211130135223.png


  • The Arduino Demo codes include the programs for ESP32, use C/C++/html languages, and developed by the Arduino IDE.
  • The Demo codes in the RPi folder are examples for Raspberry Pi, using Python3(The Web application is based on flask-streaming).

Upload example to WAVEGO

  • Run the WAVEGO/Arduino/WAVEGO/WAVEGO.ino。


  • Choose Tools > Port to check the COM port
  • The COM number should be different in different PC, choose the correct COM number.


  • Click Tools > Boards: > ESP32 Arduino > ESP32 Dev Module ,and chooseESP32 Dev Module。


  • Configure as the below options:
Upload Speed: "921600"
CPU Frequency: "240MHz(WiFi/BT)"
Flash Frequency: "80MHz"
Flash Mode: "QIO"
Flash Size: "4MB(32Mb)"
''' Partition Scheme: "Huge APP(3MB No OTA/1MB SPIFFS)"
PSRAM: "Enabled"'''
  • PSRAM should be set as Enabled, otherwise, the camera image may be blank.



  • Wait for the uploading
  • The codes are successful to upload with the information that Leaving... Hard resetting via RTS pin....。


WAVEGO Multi-function Expansion Interface

  • Since ESP32 has higher computing power and integrates WIFI and Bluetooth, and supports the use of Arduino IDE for development, we choose ESP32 as the main control chip of WAVEGO. Multi-function expansion interface as shown in the figure below.


  • As shown in the example above, connecting G12 and 3V3 can make the device enter assembly mode.
  • LED: There are two RGB LEDs on the driver board, and the numbers on the program are 0 and 1 respectively. If you need to connect more RGB-LEDs (WS2812), you can extend this interface. Correspondingly, the numbers start from 2.
  • The control functions:
  • LED_NUM: The number of the lamp beads, such as two on the control board, then LED_NUM is 0 or 1. If the first lamp bead expanded on the LED-OUT port is controlled, LED_NUM=2.
setSingleLED(LED_NUM, matrix.Color(R, G, B));
  • G21:This IO is also used to control the buzzer on the driver board. When G21 is low, the buzzer starts to sound, and when G21 is high, the buzzer does not sound.
  • G15:This IO port is not used, you can use these two IO ports to expand other modules.
  • G12:By default, this IO port is used to set the assembly mode. When the G12 is connected to the 3V3, the device enters the assembly mode. In this mode, the RGB will turn orange, and control all the servos connected to the device to rotate to the middle of the encoder, and then install the steering gear swing arm according to the specified angle.
  • RX TX: Corresponding to the UART_0 of ESP32, it can be used to communicate with other devices. It can be connected to the TX RX of the Raspberry Pi, and it can communicate with each other after the ground is supplied.
  • Note: When the RX TX is connected with the TX RX of the Raspberry Pi, the automatic download function cannot be activated, so if you need to upload a new program to the ESP32, you need to disconnect the connection between UART_0 and the Raspberry Pi.
  • The row below <TX RX GND 5V 5V> can be used to connect the Raspberry Pi, 5V and GND can be used to power the Raspberry Pi, and TX RX can be used to communicate with the Raspberry Pi.

WAVEGO Onboard Devices and Interfaces

  • The WAVEGO driver board integrates a variety of devices, most of which use IIC control (GPIO 33 as SCL, GPIO 32 as SDA) to communicate with other devices, including: ICM20948 attitude sensor, PCA9685 servo control chip, INA219 voltage detection and OLED screen (SSD1306).
  • This guide is only used to introduce the interface. For API calls of specific programs, please refer to the API documentation of the product.
  • IIC interface

GPIO 33 as SCL GPIO 32 as SDA

  • IIC address

ICM20948 0x68 INA219 0x42 SSD1306 0x3C PCA9685 0x40

  • Others


Raspberry Pi guides

  • The main control board of WAVEGO uses ESP32 for connecting rod inverse solution and gait generation, which is used to transmit to the servo for lower computer control. The positioning holes on WAVEGO can be used to install copper posts and fix Raspberry Pi 4B. WAVEGO uses multi-function The expansion interface supplies power to the Raspberry Pi, and uses UART0 to communicate with the Raspberry Pi. In the default program, the Raspberry Pi uses ttyS0 to communicate with the WAVEGO, with a baud rate of 115200.