mirror of
https://github.com/Freenove/Freenove_ESP32_WROVER_Board.git
synced 2025-07-30 00:27:22 +00:00
update
This commit is contained in:
parent
bd3522f079
commit
af73879f3d
@ -33,7 +33,7 @@ C language
|
||||
:caption: What's next?
|
||||
:glob:
|
||||
|
||||
C/What_s_next.rst
|
||||
What_s_next.rst
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
@ -135,7 +135,7 @@ According to the circuit, when the GPIO2 of ESP32-WROVER output level is high, t
|
||||
|
||||
Upload the following Sketch:
|
||||
|
||||
**Freenove_Ultimate_Starter_Kit_for_ESP32\Sketches\\Sketch_01.1_Blink.**
|
||||
**Freenove_ESP32_WROVER_Board\\Sketches\\Sketch_01.1_Blink.**
|
||||
|
||||
Before uploading the code, click "**Tools**", "**Board**" and select "**ESP32 Wrover Module**".
|
||||
|
||||
|
@ -4,9 +4,9 @@ Chapter Bluetooth
|
||||
|
||||
This chapter mainly introduces how to make simple data transmission through Bluetooth of ESP32-WROVER and mobile phones.
|
||||
|
||||
Project 2.1 is classic Bluetooth and Project 2.2 is low power Bluetooth.If you are an iPhone user, please start with Project 2.2.
|
||||
Project 02.1 is classic Bluetooth and Project 02.2 is low power Bluetooth.If you are an iPhone user, please start with Project 02.2.
|
||||
|
||||
Project 2.1 Bluetooth Passthrough
|
||||
Project 02.1 Bluetooth Passthrough
|
||||
********************************************
|
||||
|
||||
Component List
|
||||
@ -57,7 +57,7 @@ Connect Freenove ESP32 to the computer using the USB cable.
|
||||
Sketch
|
||||
===================================
|
||||
|
||||
Sketch_2.1_SerialToSerialBT
|
||||
Sketch_02.1_SerialToSerialBT
|
||||
-------------------------------------
|
||||
|
||||
.. image:: ../_static/imgs/27_Bluetooth/Chapter27_03.png
|
||||
@ -197,7 +197,7 @@ If you can't install Serial Bluetooth on your phone, try LightBlue.If you do not
|
||||
.. image:: ../_static/imgs/27_Bluetooth/Chapter27_17.png
|
||||
:align: center
|
||||
|
||||
Step1. Upload the code of Project2.2 to ESP32.
|
||||
Step1. Upload the code of Project02.2 to ESP32.
|
||||
|
||||
Step2. Click on serial monitor.
|
||||
|
||||
@ -248,14 +248,14 @@ And now data can be transferred between your mobile phone and computer via ESP32
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_2.2_BLE_USART/Sketch_2.2_BLE_USART.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_02.2_BLE_USART/Sketch_02.2_BLE_USART.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
||||
|
||||
Define the specified UUID number for BLE vendor.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_2.2_BLE_USART/Sketch_2.2_BLE_USART.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_02.2_BLE_USART/Sketch_02.2_BLE_USART.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 18-20
|
||||
@ -263,7 +263,7 @@ Define the specified UUID number for BLE vendor.
|
||||
|
||||
Write a Callback function for BLE server to manage connection of BLE.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_2.2_BLE_USART/Sketch_2.2_BLE_USART.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_02.2_BLE_USART/Sketch_02.2_BLE_USART.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 22-30
|
||||
@ -271,7 +271,7 @@ Write a Callback function for BLE server to manage connection of BLE.
|
||||
|
||||
Write Callback function with BLE features. When it is called, as the mobile terminal send data to ESP32, it will store them into reload.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_2.2_BLE_USART/Sketch_2.2_BLE_USART.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_02.2_BLE_USART/Sketch_02.2_BLE_USART.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 32-42
|
||||
@ -279,7 +279,7 @@ Write Callback function with BLE features. When it is called, as the mobile term
|
||||
|
||||
Initialize the BLE function and name it.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_2.2_BLE_USART/Sketch_2.2_BLE_USART.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_02.2_BLE_USART/Sketch_02.2_BLE_USART.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 61-61
|
||||
@ -287,7 +287,7 @@ Initialize the BLE function and name it.
|
||||
|
||||
When the mobile phone send data to ESP32 via BLE Bluetooth, it will print them out with serial port; When the serial port of ESP32 receive data, it will send them to mobile via BLE Bluetooth.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_2.2_BLE_USART/Sketch_2.2_BLE_USART.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_02.2_BLE_USART/Sketch_02.2_BLE_USART.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 65-78
|
||||
@ -307,7 +307,7 @@ The design for creating the BLE server is:
|
||||
|
||||
6. Start advertising.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_2.2_BLE_USART/Sketch_2.2_BLE_USART.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_02.2_BLE_USART/Sketch_02.2_BLE_USART.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 44-57
|
||||
|
@ -156,14 +156,14 @@ You can see the printout as shown below.
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
||||
|
||||
Add the SD card drive header file.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 7-8
|
||||
@ -171,7 +171,7 @@ Add the SD card drive header file.
|
||||
|
||||
Defines the drive pins of the SD card. Please do not modify it. Because these pins are fixed.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 10-12
|
||||
@ -179,7 +179,7 @@ Defines the drive pins of the SD card. Please do not modify it. Because these pi
|
||||
|
||||
Initialize the serial port function. Sets the drive pin for SDMMC one-bit bus mode.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 15-16
|
||||
@ -187,7 +187,7 @@ Initialize the serial port function. Sets the drive pin for SDMMC one-bit bus mo
|
||||
|
||||
Set the mount point of the SD card, set SDMMC to one-bit bus mode, and set the read and write speed to 20MHz.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 17-20
|
||||
@ -195,7 +195,7 @@ Set the mount point of the SD card, set SDMMC to one-bit bus mode, and set the r
|
||||
|
||||
Get the type of SD card and print it out through the serial port.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 21-36
|
||||
@ -203,7 +203,7 @@ Get the type of SD card and print it out through the serial port.
|
||||
|
||||
Call the listDir() function to read the folder and file names in the SD card, and print them out through the serial port. This function can be found in "sd_read_write.cpp".
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 41-41
|
||||
@ -211,7 +211,7 @@ Call the listDir() function to read the folder and file names in the SD card, an
|
||||
|
||||
Call createDir() to create a folder, and call removeDir() to delete a folder.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 43-46
|
||||
@ -223,7 +223,7 @@ Call appendFile() to append any content to txt.
|
||||
|
||||
Call readFile() to read the content in txt and print it via the serial port.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 49-51
|
||||
@ -233,7 +233,7 @@ Call deleteFile() to delete a specified file.
|
||||
|
||||
Call renameFile() to copy a file and rename it.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 53-54
|
||||
@ -241,7 +241,7 @@ Call renameFile() to copy a file and rename it.
|
||||
|
||||
Call the testFileIO() function to test the time it takes to read 512 bytes and the time it takes to write 2048*512 bytes of data.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 57-57
|
||||
@ -249,7 +249,7 @@ Call the testFileIO() function to test the time it takes to read 512 bytes and t
|
||||
|
||||
Print the total size and used size of the SD card via the serial port.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_3.1_SDMMC_Test/Sketch_3.1_SDMMC_Test.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_03.1_SDMMC_Test/Sketch_03.1_SDMMC_Test.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 59-60
|
||||
|
@ -60,14 +60,14 @@ When ESP32-WROVER successfully connects to "ssid_Router", serial monitor will pr
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.1_WiFi_Station/Sketch_4.1_WiFi_Station.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.1_WiFi_Station/Sketch_04.1_WiFi_Station.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
||||
|
||||
Include the WiFi Library header file of ESP32.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.1_WiFi_Station/Sketch_4.1_WiFi_Station.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.1_WiFi_Station/Sketch_04.1_WiFi_Station.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 7-7
|
||||
@ -75,7 +75,7 @@ Include the WiFi Library header file of ESP32.
|
||||
|
||||
Enter correct router name and password.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.1_WiFi_Station/Sketch_4.1_WiFi_Station.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.1_WiFi_Station/Sketch_04.1_WiFi_Station.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 9-10
|
||||
@ -83,7 +83,7 @@ Enter correct router name and password.
|
||||
|
||||
Set ESP32 in Station mode and connect it to your router.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.1_WiFi_Station/Sketch_4.1_WiFi_Station.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.1_WiFi_Station/Sketch_04.1_WiFi_Station.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 16-16
|
||||
@ -91,7 +91,7 @@ Set ESP32 in Station mode and connect it to your router.
|
||||
|
||||
Check whether ESP32 has connected to router successfully every 0.5s.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.1_WiFi_Station/Sketch_4.1_WiFi_Station.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.1_WiFi_Station/Sketch_04.1_WiFi_Station.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 12-15
|
||||
@ -99,7 +99,7 @@ Check whether ESP32 has connected to router successfully every 0.5s.
|
||||
|
||||
Serial monitor prints out the IP address assigned to ESP32-WROVER
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.1_WiFi_Station/Sketch_4.1_WiFi_Station.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.1_WiFi_Station/Sketch_04.1_WiFi_Station.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 23-23
|
||||
@ -148,7 +148,7 @@ Project AP mode
|
||||
Component List & Circuit
|
||||
============================================
|
||||
|
||||
Component List & Circuit are the same as in Section 3.1.
|
||||
Component List & Circuit are the same as in Section 03.1.
|
||||
|
||||
Component knowledge
|
||||
============================================
|
||||
@ -192,14 +192,14 @@ Sketch_AP_mode
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.2_WiFi_AP/Sketch_4.2_WiFi_AP.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.2_WiFi_AP/Sketch_04.2_WiFi_AP.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
||||
|
||||
Include WiFi Library header file of ESP32.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.2_WiFi_AP/Sketch_4.2_WiFi_AP.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.2_WiFi_AP/Sketch_04.2_WiFi_AP.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 7-7
|
||||
@ -207,7 +207,7 @@ Include WiFi Library header file of ESP32.
|
||||
|
||||
Enter correct AP name and password.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.2_WiFi_AP/Sketch_4.2_WiFi_AP.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.2_WiFi_AP/Sketch_04.2_WiFi_AP.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 9-10
|
||||
@ -215,7 +215,7 @@ Enter correct AP name and password.
|
||||
|
||||
Set ESP32 in AP mode.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.2_WiFi_AP/Sketch_4.2_WiFi_AP.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.2_WiFi_AP/Sketch_04.2_WiFi_AP.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 21-21
|
||||
@ -235,7 +235,7 @@ Turn on an AP in ESP32, whose name is set by ssid_AP and password is set by pass
|
||||
|
||||
Check whether the AP is turned on successfully. If yes, print out IP and MAC address of AP established by ESP32. If no, print out the failure prompt.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.2_WiFi_AP/Sketch_4.2_WiFi_AP.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.2_WiFi_AP/Sketch_04.2_WiFi_AP.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 25-32
|
||||
@ -312,7 +312,7 @@ Sketch_AP_Station_mode
|
||||
.. image:: ../_static/imgs/32_WiFi_Working_Modes/Chapter32_09.png
|
||||
:align: center
|
||||
|
||||
It is analogous to project 4.1 and project 4.2. Before running the Sketch, you need to modify ssid_Router, password_Router, ssid_AP and password_AP shown in the box of the illustration above.
|
||||
It is analogous to project 04.1 and project 04.2. Before running the Sketch, you need to modify ssid_Router, password_Router, ssid_AP and password_AP shown in the box of the illustration above.
|
||||
|
||||
After making sure that Sketch is modified correctly, compile and upload codes to ESP32-WROVER, open serial monitor and set baud rate to 115200. And then it will display as follows:
|
||||
|
||||
@ -326,7 +326,7 @@ When observing the print information of the serial monitor, turn on the WiFi sca
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_4.3_AP_Station/Sketch_4.3_AP_Station.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_04.3_AP_Station/Sketch_04.3_AP_Station.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
@ -68,7 +68,7 @@ Install ControlP5.
|
||||
.. image:: ../_static/imgs/33_TCP_IP/Chapter33_04.png
|
||||
:align: center
|
||||
|
||||
Open the "Freenove_Ultimate_Starter_Kit_for_ESP32\Sketches\Sketches\Sketch_5.1_WiFiClient\sketchWiFi\sketchWiFi.pde", and click "Run".
|
||||
Open the "Freenove_ESP32_WROVER_Board\\Sketches\\Sketches\\Sketch_05.1_WiFiClient\\sketchWiFi\\sketchWiFi.pde", and click "Run".
|
||||
|
||||
.. image:: ../_static/imgs/33_TCP_IP/Chapter33_05.png
|
||||
:align: center
|
||||
@ -117,7 +117,7 @@ Before running the Sketch, please open "sketchWiFi.pde." first, and click "Run".
|
||||
.. image:: ../_static/imgs/33_TCP_IP/Chapter33_09.png
|
||||
:align: center
|
||||
|
||||
Next, open Sketch_5.1_WiFiClient.ino. Before running it, please change the following information based on "LOCAL IP" and "LOCAL PORT" in the figure above.
|
||||
Next, open Sketch_05.1_WiFiClient.ino. Before running it, please change the following information based on "LOCAL IP" and "LOCAL PORT" in the figure above.
|
||||
|
||||
.. image:: ../_static/imgs/33_TCP_IP/Chapter33_10.png
|
||||
:align: center
|
||||
@ -144,14 +144,14 @@ Sketch_As_Client
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.1_WiFiClient/Sketch_5.1_WiFiClient.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.1_WiFiClient/Sketch_05.1_WiFiClient.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
||||
|
||||
Add WiFi function header file.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.1_WiFiClient/Sketch_5.1_WiFiClient.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.1_WiFiClient/Sketch_05.1_WiFiClient.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 7-7
|
||||
@ -159,7 +159,7 @@ Add WiFi function header file.
|
||||
|
||||
Enter the actual router name, password, remote server IP address, and port number.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.1_WiFiClient/Sketch_5.1_WiFiClient.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.1_WiFiClient/Sketch_05.1_WiFiClient.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 9-12
|
||||
@ -167,7 +167,7 @@ Enter the actual router name, password, remote server IP address, and port numbe
|
||||
|
||||
Apply for the method class of WiFiClient.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.1_WiFiClient/Sketch_5.1_WiFiClient.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.1_WiFiClient/Sketch_05.1_WiFiClient.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 13-13
|
||||
@ -175,7 +175,7 @@ Apply for the method class of WiFiClient.
|
||||
|
||||
Connect specified WiFi until it is successful. If the name and password of WiFi are correct but it still fails to connect, please push the reset key.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.1_WiFiClient/Sketch_5.1_WiFiClient.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.1_WiFiClient/Sketch_05.1_WiFiClient.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 19-24
|
||||
@ -183,7 +183,7 @@ Connect specified WiFi until it is successful. If the name and password of WiFi
|
||||
|
||||
Send connection request to remote server until connect successfully. When connect successfully, print out the connecting prompt on the serial monitor and send messages to remote server.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.1_WiFiClient/Sketch_5.1_WiFiClient.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.1_WiFiClient/Sketch_05.1_WiFiClient.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 34-39
|
||||
@ -191,7 +191,7 @@ Send connection request to remote server until connect successfully. When connec
|
||||
|
||||
When ESP32 receive messages from servers, it will print them out via serial port; Users can also send messages to servers from serial port.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.1_WiFiClient/Sketch_5.1_WiFiClient.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.1_WiFiClient/Sketch_05.1_WiFiClient.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 44-54
|
||||
@ -199,7 +199,7 @@ When ESP32 receive messages from servers, it will print them out via serial port
|
||||
|
||||
If the server is disconnected, turn off WiFi of ESP32.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.1_WiFiClient/Sketch_5.1_WiFiClient.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.1_WiFiClient/Sketch_05.1_WiFiClient.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 55-58
|
||||
@ -282,7 +282,7 @@ Serial Monitor
|
||||
|
||||
Processing:
|
||||
|
||||
Open the "Freenove_Ultimate_Starter_Kit_for_ESP32\Sketches\Sketches\Sketch_5.2_WiFiServer\
|
||||
Open the "Freenove_ESP32_WROVER_Board\\Sketches\\Sketches\\Sketch_05.2_WiFiServer\\
|
||||
|
||||
sketchWiFi\sketchWiFi.pde".
|
||||
|
||||
@ -293,14 +293,14 @@ Based on the messages printed by the serial monitor, enter correct IP address an
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.2_WiFiServer/Sketch_5.2_WiFiServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.2_WiFiServer/Sketch_05.2_WiFiServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
||||
|
||||
Apply for method class of WiFiServer.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.2_WiFiServer/Sketch_5.2_WiFiServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.2_WiFiServer/Sketch_05.2_WiFiServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 13-13
|
||||
@ -308,7 +308,7 @@ Apply for method class of WiFiServer.
|
||||
|
||||
Connect specified WiFi until it is successful. If the name and password of WiFi are correct but it still fails to connect, please push the reset key.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.2_WiFiServer/Sketch_5.2_WiFiServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.2_WiFiServer/Sketch_05.2_WiFiServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 20-28
|
||||
@ -316,7 +316,7 @@ Connect specified WiFi until it is successful. If the name and password of WiFi
|
||||
|
||||
Print out the IP address and port number of ESP32.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.2_WiFiServer/Sketch_5.2_WiFiServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.2_WiFiServer/Sketch_05.2_WiFiServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 29-31
|
||||
@ -324,7 +324,7 @@ Print out the IP address and port number of ESP32.
|
||||
|
||||
Turn on server mode of ESP32, turn on automatic reconnection.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.2_WiFiServer/Sketch_5.2_WiFiServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.2_WiFiServer/Sketch_05.2_WiFiServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 32-33
|
||||
@ -332,7 +332,7 @@ Turn on server mode of ESP32, turn on automatic reconnection.
|
||||
|
||||
When ESP32 receive messages from servers, it will print them out via serial port; Users can also send messages to servers from serial port.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_5.2_WiFiServer/Sketch_5.2_WiFiServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_05.2_WiFiServer/Sketch_05.2_WiFiServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 41-48
|
||||
|
@ -75,14 +75,14 @@ Click on Start Stream. The effect is shown in the image below.
|
||||
|
||||
The following is the main program code. You need include other code files in the same folder when write your own code.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.1_CameraWebServer/Sketch_6.1_CameraWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.1_CameraWebServer/Sketch_06.1_CameraWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
||||
|
||||
Add procedure files and API interface files related to ESP32 camera.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.1_CameraWebServer/Sketch_6.1_CameraWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.1_CameraWebServer/Sketch_06.1_CameraWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 8-30
|
||||
@ -90,7 +90,7 @@ Add procedure files and API interface files related to ESP32 camera.
|
||||
|
||||
Enter the name and password of the router
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.1_CameraWebServer/Sketch_6.1_CameraWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.1_CameraWebServer/Sketch_06.1_CameraWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 32-33
|
||||
@ -98,7 +98,7 @@ Enter the name and password of the router
|
||||
|
||||
Initialize serial port, set baud rate to 115200; open the debug and output function of the serial.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.1_CameraWebServer/Sketch_6.1_CameraWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.1_CameraWebServer/Sketch_06.1_CameraWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 40-42
|
||||
@ -106,7 +106,7 @@ Initialize serial port, set baud rate to 115200; open the debug and output funct
|
||||
|
||||
Configure parameters including interface pins of the camera. Note: It is generally not recommended to change them.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.1_CameraWebServer/Sketch_6.1_CameraWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.1_CameraWebServer/Sketch_06.1_CameraWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 79-106
|
||||
@ -114,7 +114,7 @@ Configure parameters including interface pins of the camera. Note: It is general
|
||||
|
||||
ESP32 connects to the router and prints a successful connection prompt. If it has not been successfully connected, press the reset key on the ESP32-WROVER.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.1_CameraWebServer/Sketch_6.1_CameraWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.1_CameraWebServer/Sketch_06.1_CameraWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 59-66
|
||||
@ -122,7 +122,7 @@ ESP32 connects to the router and prints a successful connection prompt. If it ha
|
||||
|
||||
Open the video streams server function of the camera and print its IP address via serial port.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.1_CameraWebServer/Sketch_6.1_CameraWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.1_CameraWebServer/Sketch_06.1_CameraWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 68-72
|
||||
@ -136,7 +136,7 @@ The set_brightness() function sets the brightness of the image, with values rang
|
||||
|
||||
The set_saturation() function sets the color saturation of the image, with values ranging from -2 to 2.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.1_CameraWebServer/Sketch_6.1_CameraWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.1_CameraWebServer/Sketch_06.1_CameraWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 53-57
|
||||
@ -223,14 +223,14 @@ The effect is shown in the image below.
|
||||
|
||||
The following is the main program code. You need include other code files in the same folder when write your own code.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.2_As_VideoWebServer/Sketch_6.2_As_VideoWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.2_As_VideoWebServer/Sketch_06.2_As_VideoWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:dedent:
|
||||
|
||||
Configure parameters including interface pins of the camera. Note: It is generally not recommended to change them.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.2_As_VideoWebServer/Sketch_6.2_As_VideoWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.2_As_VideoWebServer/Sketch_06.2_As_VideoWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 24-44
|
||||
@ -238,7 +238,7 @@ Configure parameters including interface pins of the camera. Note: It is general
|
||||
|
||||
ESP32 connects to the router and prints a successful connection prompt. If it has not been successfully connected, press the reset key on the ESP32-WROVER.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.2_As_VideoWebServer/Sketch_6.2_As_VideoWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.2_As_VideoWebServer/Sketch_06.2_As_VideoWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 69-76
|
||||
@ -246,7 +246,7 @@ ESP32 connects to the router and prints a successful connection prompt. If it ha
|
||||
|
||||
Open the video streams server function of the camera and print its IP address via serial port.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_6.2_As_VideoWebServer/Sketch_6.2_As_VideoWebServer.ino
|
||||
.. literalinclude:: ../../../freenove_Kit/C/Sketches/Sketch_06.2_As_VideoWebServer/Sketch_06.2_As_VideoWebServer.ino
|
||||
:linenos:
|
||||
:language: c
|
||||
:lines: 78-82
|
||||
|
@ -162,12 +162,12 @@ Installing CH340
|
||||
.. image:: ../_static/imgs/Preface/Preface19.png
|
||||
:align: center
|
||||
|
||||
If you would not like to download the installation package, you can open "Freenove_Ultimate_Starter_Kit_for_ESP32/CH340", we have prepared the installation package.
|
||||
If you would not like to download the installation package, you can open "Freenove_ESP32_WROVER_Board/CH340", we have prepared the installation package.
|
||||
|
||||
.. image:: ../_static/imgs/Preface/Preface20.png
|
||||
:align: center
|
||||
|
||||
2. Open the folder "Freenove_Ultimate_Starter_Kit_for_ESP32/CH340/Windows/"
|
||||
2. Open the folder "Freenove_ESP32_WROVER_Board/CH340/Windows/"
|
||||
|
||||
.. image:: ../_static/imgs/Preface/Preface21.png
|
||||
:align: center
|
||||
@ -202,9 +202,9 @@ First, download CH340 driver, click http://www.wch-ic.com/search?q=CH340&t=downl
|
||||
.. image:: ../_static/imgs/Preface/Preface26.png
|
||||
:align: center
|
||||
|
||||
If you would not like to download the installation package, you can open "Freenove_Ultimate_Starter_Kit_for_ESP32/CH340", we have prepared the installation package.
|
||||
If you would not like to download the installation package, you can open "Freenove_ESP32_WROVER_Board/CH340", we have prepared the installation package.
|
||||
|
||||
Second, open the folder "Freenove_Ultimate_Starter_Kit_for_ESP32/CH340/MAC/"
|
||||
Second, open the folder "Freenove_ESP32_WROVER_Board/CH340/MAC/"
|
||||
|
||||
.. image:: ../_static/imgs/Preface/Preface27.png
|
||||
:align: center
|
||||
|
@ -8,7 +8,7 @@ support@freenove.com
|
||||
|
||||
We will check and correct it as soon as possible.
|
||||
|
||||
If you are interesting in processing, you can learn the Processing.pdf in: Freenove_Ultimate_Starter_Kit_for_ESP32\C\Processing.pdf
|
||||
If you are interesting in processing, you can learn the Processing.pdf in: Freenove_ESP32_WROVER_Board\\C\\Processing.pdf
|
||||
|
||||
If you want to learn more about Arduino, Raspberry Pi, smart cars, robots and other interesting products in science and technology, please continue to focus on our website. We will continue to launch cost-effective, innovative and exciting products.
|
||||
|
||||
|
@ -32,7 +32,7 @@ Python language
|
||||
:caption: What's next?
|
||||
:glob:
|
||||
|
||||
Python/What_s_next(others).rst
|
||||
What_s_next(others).rst
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
@ -44,7 +44,7 @@ We can also use DC jack of extension board to power ESP32-WROVER.In this way, 5v
|
||||
Code
|
||||
===========================
|
||||
|
||||
Codes used in this tutorial are saved in "Freenove_Ultimate_Starter_Kit_for_ESP32/Python/
|
||||
Codes used in this tutorial are saved in "Freenove_ESP32_WROVER_Board/Python/
|
||||
|
||||
Python_Codes". You can move the codes to any location. For example, we save the codes in Disk(D) with the path of "D:/Micropython_Codes".
|
||||
|
||||
@ -449,7 +449,7 @@ CAUTION: Avoid any possible short circuits (especially connecting 5V or GND, 3.3
|
||||
Code
|
||||
=====================================
|
||||
|
||||
Codes used in this tutorial are saved in "Freenove_Ultimate_Starter_Kit_for_ESP32/Python/
|
||||
Codes used in this tutorial are saved in "Freenove_ESP32_WROVER_Board/Python/
|
||||
|
||||
Python_Codes". You can move the codes to any location. For example, we save the codes in Disk(D) with the path of "D:/Micropython_Codes".
|
||||
|
||||
|
@ -4,7 +4,7 @@ Chapter Bluetooth
|
||||
|
||||
This chapter mainly introduces how to make simple data transmission through Bluetooth of ESP32-WROVER and mobile phones.
|
||||
|
||||
Project 2.1 is classic Bluetooth and Project 2.2 is low power Bluetooth.If you are an iPhone user, please start with Project 2.2.
|
||||
Project 02.1 is classic Bluetooth and Project 02.2 is low power Bluetooth.If you are an iPhone user, please start with Project 02.2.
|
||||
|
||||
Project Bluetooth Low Energy Data Passthrough
|
||||
****************************************************
|
||||
@ -37,9 +37,9 @@ If you can't install Serial Bluetooth on your phone, try LightBlue.If you do not
|
||||
Code
|
||||
======================================
|
||||
|
||||
Move the program folder "Freenove_Ultimate_Starter_Kit_for_ESP32/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
Move the program folder "Freenove_ESP32_WROVER_Board/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "2.1_BLE". Select "ble_advertising.py", right click your mouse to select "Upload to /", wait for "ble_advertising.py" to be uploaded to ESP32-WROVER and then double click "BLE.py".
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "02.1_BLE". Select "ble_advertising.py", right click your mouse to select "Upload to /", wait for "ble_advertising.py" to be uploaded to ESP32-WROVER and then double click "BLE.py".
|
||||
|
||||
BLE
|
||||
--------------------------------------
|
||||
@ -96,34 +96,34 @@ And now data can be transferred between your mobile phone and computer via ESP32
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/2.1_BLE/BLE.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/02.1_BLE/BLE.py
|
||||
:language: python
|
||||
:dedent:
|
||||
|
||||
Define the specified UUID number for BLE vendor.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/2.1_BLE/BLE.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/02.1_BLE/BLE.py
|
||||
:language: python
|
||||
:lines: 20-28
|
||||
:dedent:
|
||||
|
||||
Write an _irq function to manage BLE interrupt events.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/2.1_BLE/BLE.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/02.1_BLE/BLE.py
|
||||
:language: python
|
||||
:lines: 46-63
|
||||
:dedent:
|
||||
|
||||
Initialize the BLE function and name it.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/2.1_BLE/BLE.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/02.1_BLE/BLE.py
|
||||
:language: python
|
||||
:lines: 36-36
|
||||
:dedent:
|
||||
|
||||
When the mobile phone send data to ESP32 via BLE Bluetooth, it will print them out with serial port; When the serial port of ESP32 receive data, it will send them to mobile via BLE Bluetooth.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/2.1_BLE/BLE.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/02.1_BLE/BLE.py
|
||||
:language: python
|
||||
:lines: 80-96
|
||||
:dedent:
|
||||
|
@ -43,11 +43,11 @@ Connect Freenove ESP32 to the computer using the USB cable.
|
||||
Code
|
||||
================================
|
||||
|
||||
Move the program folder "Freenove_Ultimate_Starter_Kit_for_ESP32/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
Move the program folder "Freenove_ESP32_WROVER_Board/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "3.1_Station_mode" and double click "Station_mode.py".
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "03.1_Station_mode" and double click "Station_mode.py".
|
||||
|
||||
3.1_Station_mode
|
||||
03.1_Station_mode
|
||||
-----------------------------------
|
||||
|
||||
.. image:: ../_static/imgs/32_WiFi_Working_Modes/Chapter32_12.png
|
||||
@ -62,41 +62,41 @@ After making sure the router name and password are entered correctly, compile an
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.1_Station_mode/Station_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.1_Station_mode/Station_mode.py
|
||||
:language: python
|
||||
:dedent:
|
||||
|
||||
Import network module.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.1_Station_mode/Station_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.1_Station_mode/Station_mode.py
|
||||
:language: python
|
||||
:lines: 2-2
|
||||
:dedent:
|
||||
|
||||
Enter correct router name and password.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.1_Station_mode/Station_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.1_Station_mode/Station_mode.py
|
||||
:language: python
|
||||
:lines: 4-5
|
||||
:dedent:
|
||||
|
||||
Set ESP32 in Station mode.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.1_Station_mode/Station_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.1_Station_mode/Station_mode.py
|
||||
:language: python
|
||||
:lines: 9-9
|
||||
:dedent:
|
||||
|
||||
Activate ESP32's Station mode, initiate a connection request to the router and enter the password to connect.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.1_Station_mode/Station_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.1_Station_mode/Station_mode.py
|
||||
:language: python
|
||||
:lines: 14-15
|
||||
:dedent:
|
||||
|
||||
Print the IP address assigned to ESP32-WROVER in "Shell".
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.1_Station_mode/Station_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.1_Station_mode/Station_mode.py
|
||||
:language: python
|
||||
:lines: 16-16
|
||||
:dedent:
|
||||
@ -156,7 +156,7 @@ Project AP mode
|
||||
Component List & Circuit
|
||||
============================================
|
||||
|
||||
Component List & Circuit are the same as in Section 5.1.
|
||||
Component List & Circuit are the same as in Section 05.1.
|
||||
|
||||
Component knowledge
|
||||
============================================
|
||||
@ -180,9 +180,9 @@ Connect Freenove ESP32 to the computer using the USB cable.
|
||||
Code
|
||||
===================================
|
||||
|
||||
Move the program folder "Freenove_Ultimate_Starter_Kit_for_ESP32/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
Move the program folder "Freenove_ESP32_WROVER_Board/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "3.2_AP_mode". and double click "AP_mode.py".
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "03.2_AP_mode". and double click "AP_mode.py".
|
||||
|
||||
AP_mode
|
||||
----------------------------------
|
||||
@ -204,48 +204,48 @@ Turn on the WiFi scanning function of your phone, and you can see the ssid_AP on
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.2_AP_mode/AP_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.2_AP_mode/AP_mode.py
|
||||
:language: python
|
||||
:dedent:
|
||||
|
||||
Import network module.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.2_AP_mode/AP_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.2_AP_mode/AP_mode.py
|
||||
:language: python
|
||||
:lines: 1-1
|
||||
:dedent:
|
||||
|
||||
Enter correct AP name and password.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.2_AP_mode/AP_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.2_AP_mode/AP_mode.py
|
||||
:language: python
|
||||
:lines: 3-4
|
||||
:dedent:
|
||||
|
||||
Set ESP32 in AP mode.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.2_AP_mode/AP_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.2_AP_mode/AP_mode.py
|
||||
:language: python
|
||||
:lines: 11-11
|
||||
:dedent:
|
||||
|
||||
Configure IP address, gateway and subnet mask for ESP32.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.2_AP_mode/AP_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.2_AP_mode/AP_mode.py
|
||||
:language: python
|
||||
:lines: 14-14
|
||||
:dedent:
|
||||
|
||||
Turn on an AP in ESP32, whose name is set by ssid_AP and password is set by password_AP.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.2_AP_mode/AP_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.2_AP_mode/AP_mode.py
|
||||
:language: python
|
||||
:lines: 16-17
|
||||
:dedent:
|
||||
|
||||
If the program is running abnormally, the AP disconnection function will be called.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.2_AP_mode/AP_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.2_AP_mode/AP_mode.py
|
||||
:language: python
|
||||
:lines: 25-25
|
||||
:dedent:
|
||||
@ -327,9 +327,9 @@ Connect Freenove ESP32 to the computer using the USB cable.
|
||||
Code
|
||||
============================
|
||||
|
||||
Move the program folder "Freenove_Ultimate_Starter_Kit_for_ESP32/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
Move the program folder "Freenove_ESP32_WROVER_Board/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "3.3_AP+STA_mode"and double click "AP+STA_mode.py".
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "03.3_AP+STA_mode"and double click "AP+STA_mode.py".
|
||||
|
||||
AP+STA_mode
|
||||
--------------------------
|
||||
@ -337,7 +337,7 @@ AP+STA_mode
|
||||
.. image:: ../_static/imgs/32_WiFi_Working_Modes/Chapter32_17.png
|
||||
:align: center
|
||||
|
||||
It is analogous to project 3.1 and project 3.2. Before running the Code, you need to modify ssidRouter, passwordRouter, ssidAP and passwordAP shown in the box of the illustration above.
|
||||
It is analogous to project 03.1 and project 03.2. Before running the Code, you need to modify ssidRouter, passwordRouter, ssidAP and passwordAP shown in the box of the illustration above.
|
||||
|
||||
After making sure that the code is modified correctly, click "Run current script" and the "Shell" will display as follows:
|
||||
|
||||
@ -351,6 +351,6 @@ Turn on the WiFi scanning function of your phone, and you can see the ssidAP on
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.3_AP+STA_mode/AP+STA_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.3_AP+STA_mode/AP+STA_mode.py
|
||||
:language: python
|
||||
:dedent:
|
||||
|
@ -68,7 +68,7 @@ Install ControlP5.
|
||||
.. image:: ../_static/imgs/33_TCP_IP/Chapter33_04.png
|
||||
:align: center
|
||||
|
||||
Open the "Freenove_Ultimate_Starter_Kit_for_ESP32\Sketches\Sketches\Sketch_33.1_WiFiClient\sketchWiFi\sketchWiFi.pde", and click "Run".
|
||||
Open the "Freenove_ESP32_WROVER_Board\\Sketches\\Sketches\\Sketch_33.1_WiFiClient\\sketchWiFi\\sketchWiFi.pde", and click "Run".
|
||||
|
||||
.. image:: ../_static/imgs/33_TCP_IP/Chapter33_05.png
|
||||
:align: center
|
||||
@ -122,9 +122,9 @@ The newly pop up window will use the computer's IP address by default and open a
|
||||
.. image:: ../_static/imgs/33_TCP_IP/Chapter33_20.png
|
||||
:align: center
|
||||
|
||||
Move the program folder "Freenove_Ultimate_Starter_Kit_for_ESP32/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
Move the program folder "Freenove_ESP32_WROVER_Board/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "4.1_TCP_as_Client" and double click "TCP_as_Client.py".
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "04.1_TCP_as_Client" and double click "TCP_as_Client.py".
|
||||
|
||||
Before clicking "Run current script", please modify the name and password of your router and fill in the "host" and "port" according to the IP information shown in the box below:
|
||||
|
||||
@ -151,48 +151,48 @@ ESP32 connects with TCP SERVER, and TCP SERVER receives messages from ESP32, as
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/4.1_TCP_as_Client/TCP_as_Client.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/04.1_TCP_as_Client/TCP_as_Client.py
|
||||
:language: python
|
||||
:dedent:
|
||||
|
||||
Import network、socket、time modules.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.3_AP+STA_mode/AP+STA_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.3_AP+STA_mode/AP+STA_mode.py
|
||||
:language: python
|
||||
:lines: 1-3
|
||||
:dedent:
|
||||
|
||||
Enter the actual router name, password, remote server IP address, and port number.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.3_AP+STA_mode/AP+STA_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.3_AP+STA_mode/AP+STA_mode.py
|
||||
:language: python
|
||||
:lines: 5-8
|
||||
:dedent:
|
||||
|
||||
Connect specified Router until it is successful.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.3_AP+STA_mode/AP+STA_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.3_AP+STA_mode/AP+STA_mode.py
|
||||
:language: python
|
||||
:lines: 13-21
|
||||
:dedent:
|
||||
|
||||
Connect router and then connect it to remote server.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.3_AP+STA_mode/AP+STA_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.3_AP+STA_mode/AP+STA_mode.py
|
||||
:language: python
|
||||
:lines: 23-27
|
||||
:dedent:
|
||||
|
||||
Send messages to the remote server, receive the messages from it and print them out, and then send the messages back to the server.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.3_AP+STA_mode/AP+STA_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.3_AP+STA_mode/AP+STA_mode.py
|
||||
:language: python
|
||||
:lines: 28-37
|
||||
:dedent:
|
||||
|
||||
If an exception occurs in the program, for example, the remote server is shut down, execute the following program, turn off the socket function, and disconnect the WiFi.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/3.3_AP+STA_mode/AP+STA_mode.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/03.3_AP+STA_mode/AP+STA_mode.py
|
||||
:language: python
|
||||
:lines: 39-43
|
||||
:dedent:
|
||||
@ -280,12 +280,12 @@ Connect Freenove ESP32 to the computer using a USB cable.
|
||||
Code
|
||||
===============================
|
||||
|
||||
Move the program folder "Freenove_Ultimate_Starter_Kit_for_ESP32/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
Move the program folder "Freenove_ESP32_WROVER_Board/Python/Python_Codes" to disk(D) in advance with the path of "D:/Micropython_Codes".
|
||||
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "4.2_TCP_as_Server" and double click "TCP_as_Server.py".
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "04.2_TCP_as_Server" and double click "TCP_as_Server.py".
|
||||
|
||||
Before clicking "Run current script", please modify the name and password of your router shown in the box below.
|
||||
-
|
||||
|
||||
TCP_as_Server
|
||||
---------------------------------
|
||||
|
||||
@ -299,7 +299,7 @@ After making sure that the router's name and password are correct, click "Run cu
|
||||
|
||||
Processing:
|
||||
|
||||
Open the " **Freenove_Ultimate_Starter_Kit_for_ESP32/Codes/MicroPython_Codes/4.2_TCP_as_Server/sketchWiFi/sketchWiFi.pde** ".
|
||||
Open the " **Freenove_ESP32_WROVER_Board/Codes/MicroPython_Codes/04.2_TCP_as_Server/sketchWiFi/sketchWiFi.pde** ".
|
||||
|
||||
Based on the message printed in "Shell", enter the correct IP address and port when processing, and click to establish a connection with ESP32 to communicate.
|
||||
|
||||
@ -313,41 +313,41 @@ You can enter any information in the "Send Box" of sketchWiFi. Click "Send" and
|
||||
|
||||
The following is the program code:
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/4.2_TCP_as_Server/TCP_as_Server.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/04.2_TCP_as_Server/TCP_as_Server.py
|
||||
:language: python
|
||||
:dedent:
|
||||
|
||||
Call function connectWifi() to connect to router and obtain the dynamic IP that it assigns to ESP32.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/4.2_TCP_as_Server/TCP_as_Server.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/04.2_TCP_as_Server/TCP_as_Server.py
|
||||
:language: python
|
||||
:lines: 22-23
|
||||
:dedent:
|
||||
|
||||
Open the socket server, bind the server to the dynamic IP, and open a data monitoring port.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/4.2_TCP_as_Server/TCP_as_Server.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/04.2_TCP_as_Server/TCP_as_Server.py
|
||||
:language: python
|
||||
:lines: 24-27
|
||||
:dedent:
|
||||
|
||||
Print the server's IP address and port, monitor the port and wait for the connection of other network devices.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/4.2_TCP_as_Server/TCP_as_Server.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/04.2_TCP_as_Server/TCP_as_Server.py
|
||||
:language: python
|
||||
:lines: 29-34
|
||||
:dedent:
|
||||
|
||||
Each time receiving data, print them in "Shell" and send them back to the client.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/4.2_TCP_as_Server/TCP_as_Server.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/04.2_TCP_as_Server/TCP_as_Server.py
|
||||
:language: python
|
||||
:lines: 36-46
|
||||
:dedent:
|
||||
|
||||
If the client is disconnected, close the server and disconnect WiFi.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/4.2_TCP_as_Server/TCP_as_Server.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/04.2_TCP_as_Server/TCP_as_Server.py
|
||||
:language: python
|
||||
:lines: 47-52
|
||||
:dedent:
|
||||
|
@ -32,7 +32,7 @@ Connect Freenove ESP32 to the computer using the USB cable.
|
||||
Code
|
||||
==================================
|
||||
|
||||
Move the program folder " **Freenove_Ultimate_Starter_Kit_for_ESP32/Python/Python_Codes** " to disk(D) in advance with the path of " **D:/Micropython_Codes** ".
|
||||
Move the program folder " **Freenove_ESP32_WROVER_Board/Python/Python_Codes** " to disk(D) in advance with the path of " **D:/Micropython_Codes** ".
|
||||
|
||||
Since Micropython does not provide firmware including camera module, in this chapter, we will use the camera based on the firmware in lemariva's Github project, micropython-camera-driver.
|
||||
|
||||
@ -50,7 +50,7 @@ Select "Micropython (ESP32)", select "USB-SERIAL CH340 (COM4)", and then click t
|
||||
.. image:: ../_static/imgs/34_Camera_Web_Server/Chapter34_10.png
|
||||
:align: center
|
||||
|
||||
In the new popup window, select corresponding "USB-SERIAL CH340 (COM3)" for port. Click "Browse", select " **5.1_Camera_WebServer\firmware\micropython_camera_feeeb5ea3_esp32_idf4_4.bin** ".
|
||||
In the new popup window, select corresponding "USB-SERIAL CH340 (COM3)" for port. Click "Browse", select " **05.1_Camera_WebServer\firmware\micropython_camera_feeeb5ea3_esp32_idf4_4.bin** ".
|
||||
|
||||
Select "Erase…" and click "Install"。
|
||||
|
||||
@ -59,7 +59,7 @@ Select "Erase…" and click "Install"。
|
||||
|
||||
Wait for completion.
|
||||
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "5.1_Camera_WebServer". Select folder "lib", right click your mouse to select "Upload to /", wait for "lib" to be uploaded to ESP32-WROVER and then double click "picoweb_video.py".
|
||||
Open "Thonny", click "This computer" -> "D:" -> "Micropython_Codes" -> "05.1_Camera_WebServer". Select folder "lib", right click your mouse to select "Upload to /", wait for "lib" to be uploaded to ESP32-WROVER and then double click "picoweb_video.py".
|
||||
|
||||
Camera_WebServer
|
||||
---------------------------------
|
||||
@ -94,27 +94,27 @@ The effect is shown in the image below.
|
||||
|
||||
The following is the program code.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:dedent:
|
||||
|
||||
Import picoweb、utime、camera、gc modules.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 3-6
|
||||
:dedent:
|
||||
|
||||
Before running the code, please modify the WiFi name and password in the code to ensure that the ESP32 can connect to the network.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 8-9
|
||||
:dedent:
|
||||
|
||||
Define the WiFi connection function, set the ESP32 to STA mode, and let the ESP32 connect to the nearby WiFi. If the connection is successful, the WiFi configuration information of the ESP32 will be printed; if the connection fails, the connection timeout will be printed.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 12-26
|
||||
:dedent:
|
||||
@ -123,56 +123,56 @@ The deinit() is used to disable the configuration of the camera to prevent the p
|
||||
|
||||
The init() is used to configure the camera's pin driver, image data format, resolution and other information. By default, please do not modify this function, otherwise the camera initialization fails and the image cannot be obtained.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 31-37
|
||||
:dedent:
|
||||
|
||||
This function can set the resolution of the camera individually, you can refer to the notes below to select the appropriate resolution size.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 39-45
|
||||
:dedent:
|
||||
|
||||
The following functions can modify the image information obtained by the camera.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 47-58
|
||||
:dedent:
|
||||
|
||||
This is the code for a simple web interface, used here as an example.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 61-72
|
||||
:dedent:
|
||||
|
||||
Web page response function. When a user visits the webpage "/" built by ESP32, ESP32 calls this function, allowing the user to observe a display interface in the browser.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 75-77
|
||||
:dedent:
|
||||
|
||||
send_frame() can send the image obtained by ESP32 in web page format. When someone visits the webpage "/video" built by the ESP32, the video(req, resp) function is used to continuously fetch images and send them to the browser.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 79-93
|
||||
:dedent:
|
||||
|
||||
Create two route decorators and declare their listening strings and corresponding response handlers respectively.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 96-100
|
||||
:dedent:
|
||||
|
||||
This is the main part of the program. First initialize the ESP32 camera, and then configure WiFi to connect the ESP32 to the network. Call the picoweb library, build a webserver, and run it.
|
||||
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/5.1_Camera_WebServer/picoweb_video.py
|
||||
.. literalinclude:: ../../../freenove_Kit/Python/Python_Codes/05.1_Camera_WebServer/picoweb_video.py
|
||||
:language: python
|
||||
:lines: 105-113
|
||||
:dedent:
|
||||
|
@ -10,7 +10,7 @@ We will check and correct it as soon as possible.
|
||||
|
||||
If you want learn more about ESP32, you view our ultimate tutorial:
|
||||
|
||||
https://github.com/Freenove/Freenove_Ultimate_Starter_Kit_for_ESP32/archive/master.zip
|
||||
https://github.com/Freenove/Freenove_ESP32_WROVER_Board/archive/master.zip
|
||||
|
||||
If you want to learn more about Arduino, Raspberry Pi, smart cars, robots and other interesting products in science and technology, please continue to focus on our website. We will continue to launch cost-effective, innovative and exciting products.
|
||||
|
||||
|
17
docs/source/fnk0060/codes/What_s_next(others).rst
Normal file
17
docs/source/fnk0060/codes/What_s_next(others).rst
Normal file
@ -0,0 +1,17 @@
|
||||
##############################################################################
|
||||
What's next?(others)
|
||||
##############################################################################
|
||||
|
||||
Thanks for your reading. This tutorial is all over here. If you find any mistakes, omissions or you have other ideas and questions about contents of this tutorial or the kit and etc., please feel free to contact us:
|
||||
|
||||
support@freenove.com
|
||||
|
||||
We will check and correct it as soon as possible.
|
||||
|
||||
If you want learn more about ESP32, you view our ultimate tutorial:
|
||||
|
||||
https://github.com/Freenove/Freenove_Ultimate_Starter_Kit_for_ESP32/archive/master.zip
|
||||
|
||||
If you want to learn more about Arduino, Raspberry Pi, smart cars, robots and other interesting products in science and technology, please continue to focus on our website. We will continue to launch cost-effective, innovative and exciting products.
|
||||
|
||||
http://www.freenove.com/
|
15
docs/source/fnk0060/codes/What_s_next.rst
Normal file
15
docs/source/fnk0060/codes/What_s_next.rst
Normal file
@ -0,0 +1,15 @@
|
||||
##############################################################################
|
||||
What's next?
|
||||
##############################################################################
|
||||
|
||||
Thanks for your reading. This tutorial is all over here. If you find any mistakes, omissions or you have other ideas and questions about contents of this tutorial or the kit and etc., please feel free to contact us:
|
||||
|
||||
support@freenove.com
|
||||
|
||||
We will check and correct it as soon as possible.
|
||||
|
||||
If you are interesting in processing, you can learn the Processing.pdf in: Freenove_Ultimate_Starter_Kit_for_ESP32\\C\\Processing.pdf
|
||||
|
||||
If you want to learn more about Arduino, Raspberry Pi, smart cars, robots and other interesting products in science and technology, please continue to focus on our website. We will continue to launch cost-effective, innovative and exciting products.
|
||||
|
||||
http://www.freenove.com/
|
Loading…
x
Reference in New Issue
Block a user