Difference between revisions of "Template:WAVEGO Guides"

From Waveshare Wiki
Jump to: navigation, search
(Created page with "==Assembly Guide== ;WAVEGO Pi4 Kit <youtube>https://youtu.be/SlyIttHri6M</youtube> ;WAVEGO Basic ==WAVEGO Developing== Note: The provided ESP32 board has been flashing, you c...")
 
 
(52 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
==Assembly Guide==
 
==Assembly Guide==
 +
<font color="#FF0000">
 +
'''Be sure to understand the following content before assembling.'''<br>
 +
1. Since this product uses a large number of servos, the servos are used as the component of the angle changing mechanism, and the wrong assembly will cause the robot to fail to operate normally. '''<br>
 +
2. Refer to the product assembly tutorial,'''use the correct screws to assemble the corresponding module''', otherwise it may cause the angle deadband of the Leg link action to be too large or damage the structural parts. <br>
 +
3. When it comes to the assembly part of the anti-loose nut, the tightening degree of the nut should not be too tight or it cannot rotate normally, nor too loose or it will shake outside the rotation plane. <br>
 +
'''4. All the above problems can be avoided as long as the following assembly instructions are strictly followed. '''<br>
 +
5. We also provide a pre-assembled version package and the servo is calibrated, so you do not need to assemble it. <br>
 +
</font>
 +
</div>
 +
<div class="tabbertab" title="Resources" id="myresources">
 
;WAVEGO Pi4 Kit
 
;WAVEGO Pi4 Kit
 
<youtube>https://youtu.be/SlyIttHri6M</youtube>
 
<youtube>https://youtu.be/SlyIttHri6M</youtube>
 
;WAVEGO Basic
 
;WAVEGO Basic
 +
<youtube>https://youtu.be/-v8P-EuIKP4</youtube>
 +
 +
<div class="wiki-pages jet-green-color">
 +
*[https://www.waveshare.com/wiki/How_to_Assemble_and_Use#Basic_Tutorial How to Assemble and Use WAVEGO]
 +
*[https://www.waveshare.com/wiki/How_do_I_know_WAVEGO_servo_is_assembled_and_calibrated_properly How do I know WAVEGO servo is assembled and calibrated properly]
 +
*[https://www.waveshare.com/wiki/WAVEGO:_API WAVEGO API Tutorial]
 +
*[https://www.waveshare.com/wiki/WAVEGO:_Custom_Action_Development_Tutorial WAVEGO: Custom Action Development Tutorial]
 +
*[https://www.waveshare.com/wiki/WAVEGO-GPIO_Control WAVEGO GPIO Control]
 +
*[[WAVEGO-WS2812 LED]]
 +
*[[WAVEGO-PCA9685]]
  
 
==WAVEGO Developing==
 
==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.
+
Note: The provided ESP32 board has been flashing, you can just assemble and use it as the video. This guide is provided for users who would like to modify the codes themselves.
 
===Install Arduino IDE===
 
===Install Arduino IDE===
 
*Download the Arduino IDE from [https://www.arduino.cc/ Arduino.cc website].
 
*Download the Arduino IDE from [https://www.arduino.cc/ Arduino.cc website].
*Please choose the Arduino IDE version according to your OS
+
*Please choose the Arduino IDE version according to your OS.
 
*Download and install the IDE according to the prompt.
 
*Download and install the IDE according to the prompt.
  
 
===Install Arduino core for the ESP32===
 
===Install Arduino core for the ESP32===
*Run the Arduino IDE,点击File。
+
*Run the Arduino IDE, and click File.
 
[[File:QQ截图20211130112221.png|500px]]
 
[[File:QQ截图20211130112221.png|500px]]
*Click Preferences。
+
*Click Preferences.
 
[[File:QQ截图20211130112341.png|500px]]
 
[[File:QQ截图20211130112341.png|500px]]
*In Additional Boards Manager URLs box, input the link: https://dl.espressif.com/dl/package_esp32_index.json then click OK。
+
*In the Additional Boards Manager URLs box, input the link: https://dl.espressif.com/dl/package_esp32_index.json then click OK.
[[File:QQ截图20211130113232.png|500px]]
+
[[File:QQ截图20211130113232.png|500px]]<br/>
*Restart the IDE, choose Tools > Board > Boards Manager, to open the Boards Manager。
+
<font color="#FF0000">Note: If you already have an ESP8266 board URL, you can separate the URLs with commas as follows:</font>
*Entuer ESP32 to search the library and click Install。
+
<pre>https://dl.espressif.com/dl/package_esp32_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json</pre>
 +
*Download the [https://files.waveshare.com/upload/7/70/Packages.7z package], unzip, and copy the package file to the following path:
 +
<pre>
 +
</pre>
 +
[[File: L76K GPS Module ESP32204.jpg]]<br/>
 +
<font color="#FF0000">''' Note: you can replace the user name "xutong" with your own name.'''</font>
 +
<!--
 +
*Restart the IDE, choose Tools > Board > Boards Manager, to open the Boards Manager.
 +
*Enter ESP32 to search the library and click Install.
 
[[File:QQ截图20211130113827.png|500px]]
 
[[File:QQ截图20211130113827.png|500px]]
*Wait for installing
+
*Wait for installation.
 
[[File:QQ截图20211130114001.png|500px]]
 
[[File:QQ截图20211130114001.png|500px]]
*After installing, you can use the Arduino IDE for developing the ESP32 board
+
*After installing, you can use the Arduino IDE to develop the ESP32 board.
 +
-->
  
 
===Download demo code and dependency libraies===
 
===Download demo code and dependency libraies===
*You need to install libraries below by the Libraries Manager:
+
*Download and unzip [https://files.waveshare.com/upload/6/64/Libraries%E6%96%B0.rar Libraries]. Open the default installation path on the Arduino: C:\Users\xutong\AppData\Local\Arduino15\libraries (please refer to your actual location), and copy these files to Libraries.
 +
[[File:WAVEGO Guides09.jpg]]
 +
 
 +
<!--
 +
*You need to install the libraries below by the Libraries Manager:
 
**ArduinoJson
 
**ArduinoJson
 
**Adafruit SSD1306
 
**Adafruit SSD1306
Line 35: Line 68:
 
*Click Tools > Manage Libraries to open the manager.
 
*Click Tools > Manage Libraries to open the manager.
 
[[File:QQ截图20211130115318.png|500px]]
 
[[File:QQ截图20211130115318.png|500px]]
*Type the library in the search box, find the correct libraries and install them.
+
*Type the library in the search box, find the correct libraries, and install them.
 
**ArduinoJson
 
**ArduinoJson
 
**Adafruit SSD1306
 
**Adafruit SSD1306
Line 42: Line 75:
 
**INA219 WE
 
**INA219 WE
 
**Adafruit NeoPixel
 
**Adafruit NeoPixel
*Instal or update the library.
+
*Install or update the library.
 
[[File:QQ截图20211130135130.png|500px]]
 
[[File:QQ截图20211130135130.png|500px]]
 
[[File:QQ截图20211130135223.png|500px]]
 
[[File:QQ截图20211130135223.png|500px]]
*Downoad the demo codes to your PC
+
*Download the demo codes to your PC
*[https://www.waveshare.net/w/upload/b/b6/WAVEGO_%E5%BC%80%E6%BA%90%E7%A8%8B%E5%BA%8F%EF%BC%88Arduino%EF%BC%89220128.zip WAVEGO Demo Codes(Arduino)]
+
*[https://files.waveshare.com/upload/3/32/WAVEGO_Demo_Code_%28Arduino%29_220128.zip WAVEGO Demo Codes(Arduino)]
*[https://www.waveshare.net/wiki/%E6%96%87%E4%BB%B6:WAVEGO_%E5%BC%80%E6%BA%90%E7%A8%8B%E5%BA%8F%EF%BC%88%E6%A0%91%E8%8E%93%E6%B4%BE%EF%BC%89220128.zip WAVEGO Demo COdes(Raspberry Pi)]
+
*[https://files.waveshare.com/upload/1/13/WAVEGO_Demo_Code_%28Pi%29_220128.zip WAVEGO Demo COdes(Raspberry Pi)]
 
*Unzip to get the Demo codes
 
*Unzip to get the Demo codes
 
[[File:QQ截图20220107181927.png|500px]]
 
[[File:QQ截图20220107181927.png|500px]]
*The Arduino Demo codes include the programs for ESP32, use C/C++/html languages and developed by the Arduino IDE.
+
*The Arduino Demo codes include the programs for ESP32, use C/C++/html languages, and are developed by the Arduino IDE.
*The Demo codes in RPi folder is the examples for Raspberry Pi, use Python3(The Web application is based on flask-streaming).
+
*The Demo codes in the RPi folder are examples for Raspberry Pi, using Python 3 (The Web application is based on flask-streaming).
 +
-->
  
 
===Upload example to WAVEGO===
 
===Upload example to WAVEGO===
*Run the WAVEGO/Arduino/WAVEGO/WAVEGO.ino。
+
[[File:QQ截图20211130140519.png|500px]]
+
*Download [https://files.waveshare.com/upload/b/b6/WAVEGO_%E5%BC%80%E6%BA%90%E7%A8%8B%E5%BA%8F%EF%BC%88Arduino%EF%BC%89220128.zip WAVEGO Open-source demo (Arduino)], and double click the Arduino\WAVEGO\WAVEGO.ino
*Choose Tools > Port to check the COM port
+
[[File:Wavego guides upload.png]]
*The COM number should be different in different PC, choose the correct COM number.
+
<!--[[File:QQ截图20211130140519.png|500px]]-->
 +
*Choose Tools > Port to check the COM port already on your PC. No need to click on this COM (different computers show different COMs, remember the COMs you already have on your computer).
 +
[[File:QQ截图20211130140744.png|500px]]
 +
*Connect the driver board to the computer with the USB cable.
 +
*Choose Tools > Port, and click the new COM port.
 
[[File:QQ截图20211130141904.png|500px]]
 
[[File:QQ截图20211130141904.png|500px]]
*Click Tools > Boards: > ESP32 Arduino > ESP32 Dev Module ,and chooseESP32 Dev Module。
+
*Click Tools > Boards: > ESP32 Arduino > ESP32 Dev Module, and choose ESP32 Dev Module.
[[File:QQ截图20211130142717.png|500px]]
+
[[File:QQ截图20211130142717.png|500px]]<br/>
*Configure as the below options:
+
 
 +
 
 +
*Configure as the below options: (Partition Scheme is better to use Huge APP, PSRAM must be Enabled, otherwise the camera will flash black.)
 
<pre>
 
<pre>
 +
Dev Board: "ESP32 Dev Module"
 
Upload Speed: "921600"
 
Upload Speed: "921600"
 
CPU Frequency: "240MHz(WiFi/BT)"
 
CPU Frequency: "240MHz(WiFi/BT)"
Line 68: Line 109:
 
Flash Mode: "QIO"
 
Flash Mode: "QIO"
 
Flash Size: "4MB(32Mb)"
 
Flash Size: "4MB(32Mb)"
'''Partition Scheme: "Huge APP(3MB No OTA/1MB SPIFFS)"
+
''' Partition Scheme: "Huge APP(3MB No OTA/1MB SPIFFS)"
 
PSRAM: "Enabled"'''
 
PSRAM: "Enabled"'''
 
</pre>
 
</pre>
*PSRAM shoule be set as Enabled, otherwise, the camera image may be blank.
 
 
[[File:QQ截图20211130143434.png|500px]]
 
[[File:QQ截图20211130143434.png|500px]]
*Click the ```Upload``` button to upload an example.http://www.draloric.net.cn/index.php?m=contact&a=index&classify_id=35
+
*Once the settings are complete, click Upload to upload the demo to the device.
 +
[[File: Wavego upload03.jpg]]
 +
*<font color="#FF0000">If you encounter problems during the period, you need to reinstall or replace the Arduino IDE version, uninstall the Arduino IDE needs to be uninstalled cleanly, after uninstalling the software you need to manually delete all the contents of the folder C:\Users\[name]\AppData\Local\Arduino15 (you need to show the hidden files to see it) and then Reinstall.</font>
 +
<!--
 +
*Click the ```Upload``` button to upload an example.
 +
 
 
*Note that if you connect the WAVEGO to Raspberry Pi, the auto-download circuit is disabled, you need to disconnect the Raspberry Pi and then upload the example.
 
*Note that if you connect the WAVEGO to Raspberry Pi, the auto-download circuit is disabled, you need to disconnect the Raspberry Pi and then upload the example.
 
[[File:QQ截图20211130144718.png|500px]]
 
[[File:QQ截图20211130144718.png|500px]]
* Wait for the uploading
+
* Wait for the uploading.
*The codes are successful to upload with the information that Leaving... Hard resetting via RTS pin....
+
*The codes are successful in uploading with the information that Leaving... Hard resetting via RTS pin....
 
[[File:QQ截图20211130145013.png|500px]]
 
[[File:QQ截图20211130145013.png|500px]]
 +
-->
  
 +
<!--
 
===WAVEGO Multi-function Expansion Interface ===
 
===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.  
+
*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 is shown in the figure below.  
 
[[File:QQ截图20211231144138.png|500px]]
 
[[File:QQ截图20211231144138.png|500px]]
 
*As shown in the example above, connecting G12 and 3V3 can make the device enter assembly mode.  
 
*As shown in the example above, connecting G12 and 3V3 can make the device enter assembly mode.  
Line 90: Line 137:
 
setSingleLED(LED_NUM, matrix.Color(R, G, B));
 
setSingleLED(LED_NUM, matrix.Color(R, G, B));
 
</pre>
 
</pre>
*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.  
+
*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.  
+
*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.  
+
*G12: By default, this IO port is used to set the assembly mode. When the G12 is connected to the 3V3, the device enters 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 servo 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.  
+
*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.  
+
*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.  
+
*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 ===
 
===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).  
+
*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.  
 
*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
 
*IIC interface
Line 113: Line 162:
 
RGB_LED GPIO 26
 
RGB_LED GPIO 26
 
BUZZER GPIO 21
 
BUZZER GPIO 21
 +
-->
  
 +
<!--
 
===Raspberry Pi guides===
 
===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.
+
*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.
 +
*We offer WAVEGO-RPi versions with Raspberry Pi expansion kits, RPI WAVEGO ACCE, or PI4B-4GB WAVEGO KIT. For more information, please refer to the WAVEGO with Raspberry Pi WIKI homepage.
 +
-->

Latest revision as of 06:50, 20 December 2023

Assembly Guide

Be sure to understand the following content before assembling.
1. Since this product uses a large number of servos, the servos are used as the component of the angle changing mechanism, and the wrong assembly will cause the robot to fail to operate normally.
2. Refer to the product assembly tutorial,use the correct screws to assemble the corresponding module, otherwise it may cause the angle deadband of the Leg link action to be too large or damage the structural parts.
3. When it comes to the assembly part of the anti-loose nut, the tightening degree of the nut should not be too tight or it cannot rotate normally, nor too loose or it will shake outside the rotation plane.
4. All the above problems can be avoided as long as the following assembly instructions are strictly followed.
5. We also provide a pre-assembled version package and the servo is calibrated, so you do not need to assemble it.

WAVEGO Pi4 Kit

WAVEGO Basic

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 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, and click File.

QQ截图20211130112221.png

  • Click Preferences.

QQ截图20211130112341.png

QQ截图20211130113232.png
Note: If you already have an ESP8266 board URL, you can separate the URLs with commas as follows:

https://dl.espressif.com/dl/package_esp32_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json
  • Download the package, unzip, and copy the package file to the following path:

L76K GPS Module ESP32204.jpg
Note: you can replace the user name "xutong" with your own name.

Download demo code and dependency libraies

  • Download and unzip Libraries. Open the default installation path on the Arduino: C:\Users\xutong\AppData\Local\Arduino15\libraries (please refer to your actual location), and copy these files to Libraries.

WAVEGO Guides09.jpg


Upload example to WAVEGO

Wavego guides upload.png

  • Choose Tools > Port to check the COM port already on your PC. No need to click on this COM (different computers show different COMs, remember the COMs you already have on your computer).

QQ截图20211130140744.png

  • Connect the driver board to the computer with the USB cable.
  • Choose Tools > Port, and click the new COM port.

QQ截图20211130141904.png

  • Click Tools > Boards: > ESP32 Arduino > ESP32 Dev Module, and choose ESP32 Dev Module.

QQ截图20211130142717.png


  • Configure as the below options: (Partition Scheme is better to use Huge APP, PSRAM must be Enabled, otherwise the camera will flash black.)
Dev Board: "ESP32 Dev Module"
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"'''

QQ截图20211130143434.png

  • Once the settings are complete, click Upload to upload the demo to the device.

Wavego upload03.jpg

  • If you encounter problems during the period, you need to reinstall or replace the Arduino IDE version, uninstall the Arduino IDE needs to be uninstalled cleanly, after uninstalling the software you need to manually delete all the contents of the folder C:\Users\[name]\AppData\Local\Arduino15 (you need to show the hidden files to see it) and then Reinstall.