diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000000000000000000000000000000000000..9d628607138d901bf64a2fd42ea0470fbc43f68d --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +helloworld.py \ No newline at end of file diff --git a/docs/Advanced_development/en/QuecPythonBus/WDT.md b/docs/Advanced_development/en/QuecPythonBus/WDT.md index 67fe03e7adc3800caef4ed33523bf882416d6587..d211f483f9e002bc0e01aa50e460d6beded57ff8 100644 --- a/docs/Advanced_development/en/QuecPythonBus/WDT.md +++ b/docs/Advanced_development/en/QuecPythonBus/WDT.md @@ -14,32 +14,6 @@ In this document, it mainly introduces how to use QuecPython_Watchdog on EC600S The function of WDT: The reboot will occur under the circumstance that failure to execute by the exception in APP. Since this function is embedded in interior, no peripheral circuit is needed. -## SW design - - For specific Watchdog API, please refer to the link: [Watchdog API](https://python.quectel.com/wiki/#/zh-cn/api/QuecPythonClasslib?id=wdt) - -2. Function prototype WDT (period): return a wdt object to set the feed, start and stop function of WDT. - -Create WDT object and initiate immediately - -> wdt = WDT(period) - -| Parameter | Type | Illustration | -| --------- | ---- | ------------------------------------------------------ | -| period | int | Set the detection time of SW watchdog, the unit is "s" | - -1. Function prototype **feed()**: no return value - -Feed - -> wdt.feed() - -1. Function prototype **stop()**: no return value - -Stop SW Watchdog function - -> wdt.stop() - ## Interaction 2. Interact with module via QPYcom, here shows the case: @@ -49,7 +23,7 @@ Stop SW Watchdog function Notes: 2. The purpose of executing "from machine import WDT " is to make the WDT vivid in current space. -4. Only execute "from machine import WDT " can the function and variate in WDT be used. +3. Only execute "from machine import WDT " can the function and variate in WDT be used. Note: If there is no behavior of feeding dog, the system will reset automatically after 2 s. @@ -80,6 +54,32 @@ timer1.start(period=1000, mode=timer1.PERIODIC, callback=feed) # Feed by timer ``` +## SW design + + For specific Watchdog API, please refer to the link: [Watchdog API](https://python.quectel.com/wiki/#/en-us/api/QuecPythonClasslib?id=wdt) + +2. Function prototype WDT (period): return a wdt object to set the feed, start and stop function of WDT. + +Create WDT object and initiate immediately + +> wdt = WDT(period) + +| Parameter | Type | Illustration | +| --------- | ---- | ------------------------------------------------------ | +| period | int | Set the detection time of SW watchdog, the unit is "s" | + +1. Function prototype **feed()**: no return value + +Feed + +> wdt.feed() + +1. Function prototype **stop()**: no return value + +Stop SW Watchdog function + +> wdt.stop() + ## Term explanation diff --git a/docs/Advanced_development/en/QuecPythonBus/media/watchdog_1.png b/docs/Advanced_development/en/QuecPythonBus/media/watchdog_1.png index 95bfbbba7ba88614c10c27352dfb0669889d3586..b2a1293ad7f944e97b5d5922761672e0644653c2 100644 Binary files a/docs/Advanced_development/en/QuecPythonBus/media/watchdog_1.png and b/docs/Advanced_development/en/QuecPythonBus/media/watchdog_1.png differ diff --git a/docs/Advanced_development/en/QuecPythonSub/Digital_tube.md b/docs/Advanced_development/en/QuecPythonSub/Digital_tube.md index a0e1beb3592b2eedd255e707f6defa9e0c675004..d8e11944e98ff686af8aec922f0c9756ead61ad9 100644 --- a/docs/Advanced_development/en/QuecPythonSub/Digital_tube.md +++ b/docs/Advanced_development/en/QuecPythonSub/Digital_tube.md @@ -28,11 +28,11 @@ In this experiment, in order to achieve the universality of wiring between devel | DIO | P60 | GPIO13 | GPIO4 | | GND | GND | - | - | -Note: the module pin corresponds to the software GPIO number. View Link: [GPIO related API](https://python.quectel.com/wiki/#/zh-cn/api/QuecPythonClasslib?id=pin) +Note: the module pin corresponds to the software GPIO number. View Link: [GPIO related API](https://python.quectel.com/wiki/#/en-us/api/QuecPythonClasslib?id=pin) ## Experimental code - < a href = "code / digital_tube. Py" target = "_blank" > download the code + download the code ```python """ @@ -53,25 +53,21 @@ P60 corresponds to gpio13 of ec600s / ec600n module and gpio4 of ec600u module P56 corresponds to gpio28 of ec600s / ec600n module and gpio16 of ec600u module P61 corresponds to gpio14 of ec600s / ec600n module and gpio1 of ec600u module ''' -#When the module used is ec600s / ec600n +# When the module used is ec600s / ec600n # DIO = Pin(Pin.GPIO13, Pin.OUT, Pin.PULL_PU, 0) # RCLK = Pin(Pin.GPIO28, Pin.OUT, Pin.PULL_PU, 0) # SCLK = Pin(Pin.GPIO14, Pin.OUT, Pin.PULL_PU, 0) -#When the module used is ec600u +# When the module used is ec600u DIO = Pin(Pin.GPIO4, Pin.OUT, Pin.PULL_PU, 0) RCLK = Pin(Pin.GPIO16, Pin.OUT, Pin.PULL_PU, 0) SCLK = Pin(Pin.GPIO1, Pin.OUT, Pin.PULL_PU, 0) -#Variable initialization -i = 0 -j = 0 - -#Font tuple 0 one two three four five six seven eight nine A b C d E F - +# Font tuple 0 1 2 3 4 5 6 7 8 9 A b C d E F - LED_fonts = (0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8, 0x80, 0x90, 0x88, 0x83, 0xC6, 0xA1, 0x86, 0x8E, 0xBF) -#Function to write data to 74HC595 +# Function to write data to 74HC595 def LED_OUT(data): for i in range(8): if data & 0X80: @@ -83,7 +79,7 @@ def LED_OUT(data): SCLK.write(1) -#The nixie tube displays 17 font functions in turn +# The nixie tube displays 17 font functions in turn def LED_Display(): for j in range(17): LED_OUT(LED_fonts[j]) diff --git a/docs/Advanced_development/en/QuecPythonSub/Photoresistor.md b/docs/Advanced_development/en/QuecPythonSub/Photoresistor.md index 6b692148d58363bcab4728e20b66079b2e085f31..bb4f9c12f24919ce849a380163497e82a19bcad5 100644 --- a/docs/Advanced_development/en/QuecPythonSub/Photoresistor.md +++ b/docs/Advanced_development/en/QuecPythonSub/Photoresistor.md @@ -10,6 +10,74 @@ This article mainly introduces ec600s ADC hardware resources (similar to other modules) and [QuecPython ADC API](https://python.quectel.com/wiki/#/en-us/api/QuecPythonClasslib?id=adc),and uses the ADC to detect the resistance of the current photosensitive resistor. +#### Experimental code + + download the code + +```python +''' +File: Photoresistor.py +Project: adc +File Created: Thursday, 24th December 2020 5:44:08 pm +Author: chengzhu.zhou +----- +Last Modified: Wednesday, 30th December 2020 10:10:33 am +Modified By: chengzhu.zhou +----- +Copyright 2020 - 2020 quectel +''' + +from misc import ADC +import utime as time +import _thread + + +# unit as Ω +def Voltage_to_Resistance(Volt): + # + Va = 2 * Volt + resistance = (2 * 4700 * 40200 * Va) / (2 * 4700 * (3300 - Va) - (40200 * Va)) + return resistance + + +def Photoresistor_thread(delay, retryCount): + # creat a adc device + AdcDevice = ADC() + while retryCount: + retryCount = retryCount - 1 + # get ADC.ADC0 value + adcvalue = AdcDevice.read(ADC.ADC0) + print("get ADC.ADC0 Voltage value as {0}mv".format(adcvalue)) + # Converted to resistance + resistance = Voltage_to_Resistance(adcvalue) + print("Photoresistor resistance as {0}Ω".format(resistance)) + time.sleep(delay) + pass + + +if __name__ == "__main__": + # creat a thread Convert ADC to Voltage + _thread.start_new_thread(Photoresistor_thread, (1, 10)) + print("main thread has exit") + +``` + + + +#### Experimental operation + +1. Burn the code into the development board for operation; + +2. Block the photoresist with articles and change the light intensity irradiated to the photoresist; + +3. Check the resistance change of serial port output. + +Finally, we can see in the serial port that the resistance output changes as follows. + +![](media/photoresistor_6.png) + + + ### Hardware resources Ec600s leads out two ADC interfaces. Refer to ec600s_ QuecPython_ EVB_ V1.0_ Sch.pdf document. @@ -105,106 +173,6 @@ Finally, the R22 resistance can be calculated according to the following formula ![](media/photoresistor_5.png) -#### Experimental code - - download the code - -```python -''' - -File: Photoresistor.py - -Project: adc - -File Created: Thursday, 24th December 2020 5:44:08 pm - -Author: chengzhu.zhou - ------ - -Last Modified: Wednesday, 30th December 2020 10:10:33 am - -Modified By: chengzhu.zhou - ------ - -Copyright 2020 - 2020 quectel - -''' - -from misc import ADC - -import utime as time - -import _thread - - - -# unit as Ω - -def Voltage_to_Resistance(Volt): - - # - - Va = 2 * Volt - - resistance = (2 * 4700 * 40200 * Va)/(2 * 4700 * (3300 - Va) - (40200 *Va)) - - return resistance - - - -def Photoresistor_thread(delay, retryCount): - - # creat a adc device - - AdcDevice = ADC() - - while retryCount: - - retryCount = retryCount - 1 - - # get ADC.ADC0 value - - adcvalue = AdcDevice.read(ADC.ADC0) - - print("get ADC.ADC0 Voltage value as {0}mv".format(adcvalue)) - - # Converted to resistance - - resistance = Voltage_to_Resistance(adcvalue) - - print("Photoresistor resistance as {0}Ω".format(resistance)) - - time.sleep(delay) - - pass - - - -if __name__ == "__main__": - - # creat a thread Convert ADC to Voltage - - _thread.start_new_thread(Photoresistor_thread, (1, 10)) - - print("creent main thread has exit") -``` - - - -#### Experimental operation - -1. Burn the code into the development board for operation; - -2. Block the photoresist with articles and change the light intensity irradiated to the photoresist; - -3. Check the resistance change of serial port output. - -Finally, we can see in the serial port that the resistance output changes as follows. - -![](media/photoresistor_6.png) - ### Professional terms diff --git a/docs/Advanced_development/en/QuecPythonSub/code/Digital_tube.py b/docs/Advanced_development/en/QuecPythonSub/code/Digital_tube.py index b59691dc1bb40b879a791a0d82be116ed93f4aa4..c835229971bbf3a1ec2cf2b0b0def7cd12d73788 100644 --- a/docs/Advanced_development/en/QuecPythonSub/code/Digital_tube.py +++ b/docs/Advanced_development/en/QuecPythonSub/code/Digital_tube.py @@ -8,33 +8,29 @@ from machine import Pin import utime ''' -数码管模块和V1.3开发板的排针连接方式为: -DIO接开发板上P60对应的排针 -RCLK接开发板上P58对应的排针 -SCLK接开发板上P61对应的排针 -P60对应EC600S/EC600N模组的GPIO13、对应EC600U模组的GPIO4 -P56对应EC600S/EC600N模组的GPIO28、对应EC600U模组的GPIO16 -P61对应EC600S/EC600N模组的GPIO14、对应EC600U模组的GPIO1 +The pin arrangement connection mode of nixie tube module and v1.3 development board is: +Dio is connected to the row pin corresponding to P60 on the development board +RCLK is connected to the row pin corresponding to P58 on the development board +SCLK is connected to the row pin corresponding to p61 on the development board +P60 corresponds to gpio13 of ec600s / ec600n module and gpio4 of ec600u module +P56 corresponds to gpio28 of ec600s / ec600n module and gpio16 of ec600u module +P61 corresponds to gpio14 of ec600s / ec600n module and gpio1 of ec600u module ''' -# 当使用的模组为EC600S/EC600N时 +# When the module used is ec600s / ec600n # DIO = Pin(Pin.GPIO13, Pin.OUT, Pin.PULL_PU, 0) # RCLK = Pin(Pin.GPIO28, Pin.OUT, Pin.PULL_PU, 0) # SCLK = Pin(Pin.GPIO14, Pin.OUT, Pin.PULL_PU, 0) -# 当使用的模组为EC600U时 +# When the module used is ec600u DIO = Pin(Pin.GPIO4, Pin.OUT, Pin.PULL_PU, 0) RCLK = Pin(Pin.GPIO16, Pin.OUT, Pin.PULL_PU, 0) SCLK = Pin(Pin.GPIO1, Pin.OUT, Pin.PULL_PU, 0) -# 变量初始化 -i = 0 -j = 0 - -# 字模元组 0 1 2 3 4 5 6 7 8 9 A b C d E F - +# Font tuple 0 1 2 3 4 5 6 7 8 9 A b C d E F - LED_fonts = (0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8, 0x80, 0x90, 0x88, 0x83, 0xC6, 0xA1, 0x86, 0x8E, 0xBF) -# 向74HC595写入数据的函数 +# Function to write data to 74HC595 def LED_OUT(data): for i in range(8): if data & 0X80: @@ -46,7 +42,7 @@ def LED_OUT(data): SCLK.write(1) -# 数码管依次显示17个字模的函数 +# The nixie tube displays 17 font functions in turn def LED_Display(): for j in range(17): LED_OUT(LED_fonts[j]) diff --git a/docs/Advanced_development/en/QuecPythonSub/code/Photoresistor.py b/docs/Advanced_development/en/QuecPythonSub/code/Photoresistor.py index 171b64f561878b3bec1e24cd05783b12fadbbcfc..878eab73a32ab612ac279e6ad9820eab18d02f4c 100644 --- a/docs/Advanced_development/en/QuecPythonSub/code/Photoresistor.py +++ b/docs/Advanced_development/en/QuecPythonSub/code/Photoresistor.py @@ -10,16 +10,16 @@ Modified By: chengzhu.zhou Copyright 2020 - 2020 quectel ''' - from misc import ADC import utime as time import _thread + # unit as Ω def Voltage_to_Resistance(Volt): # Va = 2 * Volt - resistance = (2 * 4700 * 40200 * Va)/(2 * 4700 * (3300 - Va) - (40200 * Va)) + resistance = (2 * 4700 * 40200 * Va) / (2 * 4700 * (3300 - Va) - (40200 * Va)) return resistance @@ -41,6 +41,4 @@ def Photoresistor_thread(delay, retryCount): if __name__ == "__main__": # creat a thread Convert ADC to Voltage _thread.start_new_thread(Photoresistor_thread, (1, 10)) - print("creent main thread has exit") - - + print("main thread has exit") diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/Hardware_Support_EC600X.md b/docs/Quecpython_intro/en/Qp_Hw_EC600X/Hardware_Support_EC600X.md index 91b6a1a7829d816b0e2ab36c874f7425cf2e86a7..76f65360871359c1270694387e25fd2073284342 100644 --- a/docs/Quecpython_intro/en/Qp_Hw_EC600X/Hardware_Support_EC600X.md +++ b/docs/Quecpython_intro/en/Qp_Hw_EC600X/Hardware_Support_EC600X.md @@ -102,7 +102,7 @@ Many interfaces and peripherals are included in EVB for developer to do exploration and debug. Meanwhile, multiply little tests are provided in the QuecPython official website. -For address, please refer to (https://python.quectel.com/doc/doc/little_demo/zh/index.html) +For address, please refer to (https://python.quectel.com/doc/doc/Advanced_development/en/) #### Fulfill product prototype @@ -264,14 +264,14 @@ Multiply sensors and other peripherals are embedded on the EVB, please check the ## Function Specification -| Notice: Part of circuit schematic diagrams may not applicable to the EVB of all versions, for corresponding version, please download on official website or via QQ Group: **445121768**. | +| Notice: Part of circuit schematic diagrams may not applicable to the EVB of all versions, for corresponding version, please download on official website. | | ------------------------------------------------------------ | ### LCD Interface -The EVB is implemented with LCD interface and developer can do operations such as lighting the LCD screen and displaying pictures and words via it. More info if matched with LVGL.(Click the link to get knowledge of “[LCD](https://python.quectel.com/doc/doc/sbs/zh/sbs/lcd.html)”) +The EVB is implemented with LCD interface and developer can do operations such as lighting the LCD screen and displaying pictures and words via it. More info if matched with LVGL.(Click the link to get knowledge of “[LCD](https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonSub/LCD.html)”) Currently, screen supported by QuecPython: @@ -297,7 +297,7 @@ Currently, screen supported by QuecPython: In V1.2 EVB, it is embedded with 3-axis accelerometer of LIS2DH12TR; while as for V1.3 EVB, it is reserved sobering space instead of this accelerometer. This accelerometer is featured with small volume, low power consumption and high flexibility. It is acceptable for developer to collect the moving state & posture of EVB via it. -Click the link to learn [“Accelerometers” little test](https://python.quectel.com/doc/doc/little_demo/zh/QuecPythonTest/i2c_lis2dh.html) +Click the link to learn [“Accelerometers” little test](https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonSub/i2c_lis2dh.html) ![](media/EC600X_LIS2DH12TR.png) @@ -307,7 +307,7 @@ Click the link to learn [“Accelerometers” little test](https://python.quect The demo board is integrated with photo-resistor with high sensitivity of GL5528. As the photo-resistor is extremely sensitive to light, when there is no light, it is in a high resistance state with 1.5 MΩ; while in light, the value will be reduced to 1 KΩ or below. Developer should collect the info of light when using it. - Click the link to learn [Photoresistor test](https://python.quectel.com/doc/doc/little_demo/zh/QuecPythonTest/Photoresistor.html) + Click the link to learn [Photoresistor test](https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonSub/Photoresistor.html) ![](media/EC600X_GL5528.png) @@ -315,11 +315,11 @@ The demo board is integrated with photo-resistor with high sensitivity of GL5528 | Note | | ------------------------------------------------------------ | -| Only the suffix of EC600N is the ADC function of UNNSA module can it be used. | +| EC600N series modules only EC600NCNLD ADC functions are calibrated. The EC600U series and subsequent modules can be used unless otherwise specified. | ### Temperature and humidity sensor -The EVB is integrated with AHT10 temperature & humidity sensor, which is featured with low power consumption, small volume, accuracy in counting. The developer can collect info such as temperature and humidity of environment via it. For more info, please refer to the link: [](https://python.quectel.com/wiki/study/zh-cn/study/QuecPythonTest/i2c_aht/) +The EVB is integrated with AHT10 temperature & humidity sensor, which is featured with low power consumption, small volume, accuracy in counting. The developer can collect info such as temperature and humidity of environment via it. For more info, please refer to the link: [AHT10 temperature & humidity sensor](https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonSub/i2c_aht.html) ![](media/EC600X_AHT10.png) @@ -327,7 +327,7 @@ The EVB is integrated with AHT10 temperature & humidity sensor, which is feature ### Audio Power Amplifier (Power Amplifier Chipset) -The EVB is equipped with audio power amplifier. As for V1.1, it is integrated with AW8733ATQR, which belongs to K type with characteristics of superior TDD restraint, super volume, break protection, ultra-low EMI and 2.0 W output power. While for V1.2 and V1.3, it is NS4160 that is embedded, which is featured with working mode switch between AB type and D type, ultra-low EMI, filter-free and 5W single channel audio power amplifier. Click the link for more info:[Audio module development.](https://python.quectel.com/doc/doc/Advanced_development/zh/QuecPythonSub/Audio.html) +The EVB is equipped with audio power amplifier. As for V1.1, it is integrated with AW8733ATQR, which belongs to K type with characteristics of superior TDD restraint, super volume, break protection, ultra-low EMI and 2.0 W output power. While for V1.2 and V1.3, it is NS4160 that is embedded, which is featured with working mode switch between AB type and D type, ultra-low EMI, filter-free and 5W single channel audio power amplifier. Click the link for more info:[Audio module development.](https://python.quectel.com/doc/doc/sbs/en/QuecPythonPlatform/Audio.html) ![](media/EC600X_PA.png) @@ -348,7 +348,7 @@ The EVB is equipped with audio power amplifier. As for V1.1, it is integrated wi The EVB is implemented with 2 micro keys, so the developer can assign the function on his own. -Click the link to learn (https://python.quectel.com/doc/doc/little_demo/zh/QuecPythonTest/button.html) +Click the link to learn [Key input experiment](https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonBus/button.html) ![KEY](media/EC600X_kEY.png) @@ -364,7 +364,7 @@ A GNSS module L76K is attached to the demo board V1.2 and V1.3 individually, th | Note | | ------------------------------------------------------------ | -| As for the EVB before V1.1, there is no such GNSS module is configured. | +| Some development boards are not configured with this GNSS module. | @@ -372,7 +372,7 @@ A GNSS module L76K is attached to the demo board V1.2 and V1.3 individually, th ### Power on EVB -For modules, the condition to power on is similar; however, due to the difference in HW design, the power on operation among different EVBs are also varied. Therefore, it is strongly recommended to check the following table for a reference. +For modules, the condition to power on is similar; however, due to the difference in HW design, the power on operation among different EVBs are also varied. **Therefore, it is strongly recommended to check the following table for a reference.** | EVB | Boot operation | | -------------------------- | ------------------------------------------------------------ | @@ -391,7 +391,7 @@ Downloading address for driver : 1. **The driver is divided into two categories:** -**No. 1 Based on the platform: ASR platform (EC600S、EC600N and EC100Y)and RDA platform(EC600U and EC200U ). For more info about platform, please refer to the link :[HW Support.](https://python.quectel.com/doc/doc/Quecpython_intro/zh/Qp_Product_intro/Hardware_Support.html)** +**No. 1 Based on the platform: ASR platform (EC600S、EC600N and EC100Y)and RDA platform(EC600U and EC200U ). For more info about platform, please refer to the link :[HW Support.](https://python.quectel.com/doc/doc/Quecpython_intro/en/Qp_Product_intro/Hardware_Support.html)** Many may ask what the platform of EC600X is. Generally, the ”**X**“ in EC600X is an unknown, which can indicate EC600S or EC600U instead of the actual platform. @@ -426,7 +426,6 @@ Many may ask what the platform of EC600X is. Generally, the ”**X**“ in EC600 | (1)Please back up your vital files and save your working progress in fear of file loss caused by something unexpected before installation. | | (2)There is no need to reboot the PC after the installation is done. | | (3)If there is a need to repair or unload driver program, just run this driver installation program and select "**Repair**" or "**Unload**". | -| (4)If it is a failure to install, please feel free to contact our on-line support via QQ Group: 445121768. | ### Verify the driver installation @@ -438,7 +437,7 @@ Open "Device Manager" on PC and enter it, then unfold "**Port (COM and LPT)**", - **Quectel USB DIAG Port (COMx)** - **Quectel USB MI05 COM Port (COMx)** -In terms of EC200U and EC600U, 8 serial interface devices will appear: +In terms of EC200U and EC600U, 7 serial interface devices will appear: - **Quectel USB AT Port (COMx)** - **Quectel USB AP Log Port (COMx)** @@ -447,12 +446,11 @@ In terms of EC200U and EC600U, 8 serial interface devices will appear: - **Quectel USB MOS Port (COMx)** - **Quectel Modem (COMx)** - **Quectel USB Serial-1 Port (COMx)** -- **Quectel USB Serial-2 Port (COMx)** | Tips: | | ------------------------------------------------------------ | | As for the port quantity and name of EC200U and EC600U, when downloading QuecPython FW, there will be no change. | -| Then how to open "device manager"? it is available via following steps: "My PC"- ”This PC“- "Attribute"-"Device Manager". | +| Then how to open "Device Manager"? it is available via following steps: ”This PC“- "Properties"-"Device Manager". | @@ -463,7 +461,7 @@ If no serial interface device is identified by PC, please check as described bel - Whether the USB driver is installed correctly - Whether the mainboard driver is correctly attached to the PC. -If it still can't be solved, please feel free to contact us via QQ Group: **445121768**. +If this cannot be ruled out, please contact our technical support. If the PC just identifies two serial interface devices without "**Quectel USB MI05 COM Port**", the probable reason may lie in the unflashed QuecPython FW. There is no hurry, refer to the next chapter to flash the QuecPython FW. @@ -489,7 +487,7 @@ Downloading address of QPYcom: For specific location, please refer to following screenshot. -QPYcom_position +QPYcom_position Steps to check FW version via QPYcom @@ -500,13 +498,13 @@ Steps to check FW version via QPYcom 3. Select code interaction serial interface, then enable it after setting the default baud as 115200. | Module Series | Select the interaction serial interface name | -| ------------- | -------------------------------------------- | + | ------------- | -------------------------------------------- | | EC200U | Quectel USB Serial-1 Port | | EC600U | Quectel USB Serial-1 Port | | EC600S | Quectel USB MI05 COM Port | | EC600N | Quectel USB MI05 COM Port | -4. Click “**Interaction**” label enter the inner page +4. Click “**REPL**” label enter the inner page 5. Input commands as described below, then check the returned content of module @@ -534,14 +532,14 @@ What does QuecPython FW mean (hereinafter abbreviated as ”FW”) and why shoul 3. **About FW, owing to the FW zip package downloaded from official website contains FW package and change log, only unzip the FW package furtherly can you get the flashed FW package. Both EC600S and EC600N FW packages share the same suffix *.bin*;while the *.pac* serves as the suffix in both EC200U and EC600U.** -4. **Before downloading FW, it is suggested to confirm the FW version priorly so as to avoid degrade or download the wrong one. After downloading, all contents in user area will be empty( the version which saves the vital parameters of user is under development)** +4. **Before downloading FW, it is suggested to confirm the FW version priorly so as to avoid degrade or download the wrong one. After downloading, all contents in user area will be empty( Unless stored in SecureData).** 5. **Steps to download FW via QPYcom** - After downloading QPYcom, unzip it to arbitrary directory, double click **QPYcom.exe** to run. - Connect the demo board to PC and start up. - Click “**Download**” label and enter downloading page - - Build new item on the leftNav of the downloading page, then click ”**Select FW**”. + - **Create** new item on the leftNav of the downloading page, then click ”**Choose FW**”. - Left click the inverted triangle on the bottom-right corner on this page, and select “**Download FW**” in the menu; after that, click “**Download FW**” button, the tool will get down to downloading FW automatically. | Tips | @@ -551,27 +549,27 @@ What does QuecPython FW mean (hereinafter abbreviated as ”FW”) and why shoul | Note | | ------------------------------------------------------------ | -| When downloading FW, please do not exit tool or plug out the serial interface, which may result in the inaccessibility of module. Once above situation happens, you can refer to the chapter “[How to rescue QuecPython from inaccessibility”](https://python.quectel.com/doc/doc/FAQ/zh/QP_recovery/QP_recovery.html) | +| When downloading FW, please do not exit tool or plug out the serial interface, which may result in the inaccessibility of module. Once above situation happens, you can refer to the chapter “[How to rescue QuecPython from inaccessibility”](https://python.quectel.com/doc/doc/FAQ/en/QP_recovery/QP_recovery.html) | -![image-20210923154535725_210929](media\image-20210923154535725_210929.png) +![image-20210923154535725_210929](media\download_FW_01.png) -image-20210923154814394_210929 +image-20210923154814394_210929 -![image-20210929102154255_210929](media\image-20210929102154255_210929.png) +![image-20210929102154255_210929](media\download_FW_03.png) - + @@ -579,7 +577,7 @@ After the download is complete, the above method is available to send AT command ### Download *Helloworld.py* program to demo board -We can download the Python script file of us to module via QPYcom. +We can download the Python script file of us to module via **QPYcom**. hello world.py Codes (Download codes): @@ -592,30 +590,24 @@ while True: **Specific steps:** -- After downloading QPYcom, unzip it to arbitrary directory, double click QPYcom.exe to run. -- Connect the demo board to PC and start up +- After downloading **QPYcom**, unzip it to arbitrary directory, double click QPYcom.exe to run. +- Connect the demo board to PC and start up. - Select code interaction serial interface, make the default baud and open serial interface. - Click “**File**” label and enter file page( the left indicated the files of local PC, and the right tells the files on module end). -- Scan over the files of PC on the left and select the corresponding **.py** file. Then drag this file to the “**Root**” node or “**user**” directory on the right, the file will be downloaded to the module as long as you release the left key of mouse. ( Click the “**+**” button on the right bar is also available, scan and select file needed, and download it to the module) +- Scan over the files of PC on the left and select the corresponding **.py** file. Then drag this file to the “**Root**” node or “**usr**” directory on the right, the file will be downloaded to the module as long as you release the left key of mouse. ( Click the “**+**” button on the right bar is also available, scan and select file needed, and download it to the module) - During the process of downloading file, there will be downloading process on the bottom state bar; if it is 100%, which means the download is a success. -As for file system of older file, please download it to “**Root**” node: + As for file system of older file, please download it to “**Root**” node,current versions are all new file systems. - +​ As for the dual file system of new system, download it to "**usr**" directory -​ As for the dual file system of new system, download it to "**user**" directory - - + As the figure implies, the “**hello world.py**” file has been downloaded to the main directory of module in this moment, you can check via “interaction” page in QPYcom. -Steps to check in the file system of older version - - - Steps to check in the dual file system of new version - + | Tips | | ------------------------------------------------------------ | @@ -632,7 +624,7 @@ Two ways are approachable to run the Python script in module. 2. After downloading QPYcom, unzip it to arbitrary directory, double click **QPYcom.exe** to run. -4. Connect the demo board to PC and start up +4. Connect the demo board to PC and start up. 6. Select “**code interaction serial interface**”, make the default baud and open serial interface. 8. Click “File” label and enter file page (The left indicated the files of local PC, and the right tells the files on module end). 10. Scan over the file in the module on the right and select the py file which needs to be ran. Click ” **Triangle**” button as figure below, it will skip over to the “**Interaction**” page and run this script file. @@ -643,16 +635,12 @@ Two ways are approachable to run the Python script in module. ```python import example -example.exec(‘hello world.py’) +example.exec(‘usr/helloworld.py’) ``` -| Tip | -| ------------------------------------------------------------ | -| If it is the dual-file system, following command should be executed: import example example.exec(‘usr/hello world.py’) | - Next figure displays the running result. - + @@ -664,10 +652,10 @@ In QuecPython, it supports executing user codes automatically after power-on. Af | ------------------------------------------------------------ | | The file name shall be main.py (Cases should be coincide completely) and put in the user partition, then the auto running can be realized after starting up. If the *main.py* calls other *py* and *mpy* files, which should be downloaded into the user partition. | -Take ***helloworld.py*** as an example. Print " hello world! " string with a period of 1s via the method provided by helloworld.py file; and following codes shows the method to call ***hello world.py*** in ***main.py*** file. +Take ***helloworld.py*** as an example. Print " hello world! " string with a period of 1s via the method provided by helloworld.py file; and following codes shows the method to call ***helloworld.py*** in ***main.py*** file. ```python -#helloworld.pycode +# helloworld.py code import utime def prtHelloworld(): while True: @@ -689,23 +677,25 @@ helloworld.prtHelloworld() (2)For the py file in dual-file system, two methods are acceptable to import: -**Method 1:** from usr import helloworld “#helloworld” means the name of py--helloworld.prtHelloworld() . +**Method 1:** from usr import helloworld #“helloworld” means py file name -**Method2:** import usr.helloworld #It means the helloworld.py file under usr directory. +​ helloworld.prtHelloworld() -usr.helloworld.prtHelloworld() # Note: if in this method, the **usr** should be prefixed. +**Method2:** import usr.helloworld #It means the helloworld.py file under usr directory. + +​ usr.helloworld.prtHelloworld() # Note: if in this method, the **usr** should be prefixed. (3)Integrating above two methods, which can be induced: from usr.helloworld import * prtHelloworld() #The import* has been done, as a result, call the function name directly. -Download above two files into module. +Download above two files into module(Download codes). ![file_position](media/file_position.png) -Press the "**RESET**" on demo board to reboot the system, then re-connect the main serial interface. After that, Click"**Enter**" key to enter the window to check the result. +After the file is downloaded successfully, the tool will automatically restart the VIRTUAL machine. At this time, click **REPL** to see the printed "hello world".If the tool cannot automatically restart the VM, manually press the **RST** button on the development board to restart the module, and then open the serial port to view the output result. -file_running +file_running @@ -715,7 +705,7 @@ Press the "**RESET**" on demo board to reboot the system, then re-connect the ma | Note | | ------------------------------------------------------------ | -| As for script of auto running or cycle output, it is invalid to stop it by clicking "Ctrl+C" or even by locking the interacted module. The only way to solve it to re-flash the FW. | +| Press **Ctrl+C** to stop automatic or looping scripts; The script cannot be terminated if the module goes into interactive protection manually. There is only one way to do this: reload the firmware. | ### Common issues @@ -727,9 +717,9 @@ A:Login the QuecPython official website and download: -P.S. Any question, please refer to the online documents on official websites or get access to QuecPython community. https://forumschinese.quectel.com/c/function-subjects/quectpython/43 +P.S. Any question, please refer to the online documents on official websites or get access to [QuecPython community](https://forums.quectel.com/c/quecpython/66). + -Or contact us on QQ Group: **445121768** ## Appendix 1. Silkscreen diagram of Demo BoardV1.1 diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/DM_Quecpython.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/DM_Quecpython.png index 5206d0512beab4dfb59b0eb522bd697a9cffe178..43f4412671a7c22db9a530fa33c6486b044ea318 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/DM_Quecpython.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/DM_Quecpython.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/DM_not_Quecpython.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/DM_not_Quecpython.png index ee6775860106c0d0b2aa52143f85c6041fb1ebf0..fab8526ba1cd4dee474cdd14f6954585e20bb417 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/DM_not_Quecpython.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/DM_not_Quecpython.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/QPYcom_position.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/QPYcom_position.png index cd8bec444ce80ccb4c1112af96c47ca16c939d77..d31c549bd6eb1cfc87c97f904eade9e363fe8e78 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/QPYcom_position.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/QPYcom_position.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/Running_results.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/Running_results.png index 7ca1e2e119ad41f990156d9dc6bdee14cf6ae930..b2565d4f5c0c8899921388459b4f7091a47dd650 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/Running_results.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/Running_results.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_01.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_01.png new file mode 100644 index 0000000000000000000000000000000000000000..2fb46940495401acb61962d395c24fd7511ff87f Binary files /dev/null and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_01.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_02.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_02.png new file mode 100644 index 0000000000000000000000000000000000000000..401de91cafff780cec4a58e7bc75837f14f93ee1 Binary files /dev/null and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_02.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_03.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_03.png new file mode 100644 index 0000000000000000000000000000000000000000..6b9ecbdadda9d4bce88bb9e905c620b54dd4aaaf Binary files /dev/null and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_FW_03.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_finish.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_finish.png index ab3cb1fe7cfdec6c3f0b09cacbadd0affed098cf..30b467d69b89d9564965b813889cbcba276c8581 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_finish.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/download_finish.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_check_1.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_check_1.png index 73b99433166e8d1566cc72e8bca5c074c358f652..cc7d57db90e6b8f8d061813aaee07e7766049ca4 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_check_1.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_check_1.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_position.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_position.png index 958aaa77b19d5e4f5e9b7a004ef4e237aad1237a..c5717d2df5e535fadc4c9cde17edcae293219817 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_position.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_position.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_running.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_running.png index 69061da40db2b6bac5ab6bcb32198d9a217c929d..144d38baee81123f638578563a59abffb624a2ce 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_running.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_running.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_upload.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_upload.png deleted file mode 100644 index b6ace6806c9b292705ee6c8bd3796432c53e758c..0000000000000000000000000000000000000000 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_upload.png and /dev/null differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_upload_1.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_upload_1.png index 1b281bcc8b528ee2b12d339c0c2b2e710e13a29c..07cd50cba49bb1e4ced11ffe35993b7a8ee5c988 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_upload_1.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/file_upload_1.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/firmware_check02.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/firmware_check02.png index 3bbd1d074ad2f6962e5f566a56075a2a7e3b5ed0..13472a6f29d7f02cf77bf2e63b2d6dbab0cfb517 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/firmware_check02.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/firmware_check02.png differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/image-20210923154535725_210929.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/image-20210923154535725_210929.png deleted file mode 100644 index 34510e3d1b7729495899d55df437de377960e522..0000000000000000000000000000000000000000 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/image-20210923154535725_210929.png and /dev/null differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/image-20210923154814394_210929.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/image-20210923154814394_210929.png deleted file mode 100644 index 9c1be672005a8831a36411595cc7e34af2f86a72..0000000000000000000000000000000000000000 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/image-20210923154814394_210929.png and /dev/null differ diff --git a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/start.png b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/start.png index 51766ffc669601b96eceb9fe88653986ed23ddb0..df9904887eec06aaaf6913b141c631e47fa34e94 100644 Binary files a/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/start.png and b/docs/Quecpython_intro/en/Qp_Hw_EC600X/media/start.png differ diff --git a/docs/Quecpython_intro/en/Qp_Product_intro/Data_Acquisition.md b/docs/Quecpython_intro/en/Qp_Product_intro/Data_Acquisition.md index 6464ba5d691e1d265cf79fbdf3af5bc68a629fcc..181796555469ac9666a5aae277d9c0b1988838af 100644 --- a/docs/Quecpython_intro/en/Qp_Product_intro/Data_Acquisition.md +++ b/docs/Quecpython_intro/en/Qp_Product_intro/Data_Acquisition.md @@ -3,6 +3,7 @@ | **Version** | **Date** | **Author** | **Description** | | -------- | ---------- | -------- | ---------------------------------- | | 1.0 | 2021-09-31 | Rivern | Initial Version | +| 1.1 | 2022-02-10 | Kayden | English version Revised | ## Get FW of QuecPython development and take part in official communication group @@ -12,19 +13,17 @@ > > Wiki on official website [Download video (which is commonly used) and lesson (step by step) as well as API library]:https://python.quectel.com/wiki/#/ > -> Documentary file on official website (Various files from Quick start to expert, highly recommended):https://python.quectel.com/doc/ +> Documentary file on official website (Various files from Quick start to expert, highly recommended):https://python.quectel.com/doc/en/ > -> Work order system:https://workorder.quectel.com/ +> Work order system:https://en-workorder.quectel.com/ > -> QuecPython community:https://forumschinese.quectel.com/c/function-subjects/quectpython/43 -> -> Development group of QuecPython official QQ:445121768 +> QuecPython community:https://forums.quectel.com/c/quecpython/66 > > Wechat official account platform:QuecPython > -> Quectel OTA upgrade platform: https://cloudota.quectel.com/ +> Quectel OTA upgrade platform: https://cloudota.quectel.com/login?redirect=%2F404 > -> Quectel IoT management platform:https://python.quectel.com/doc/doc/Advanced_development/zh/QuecPythonCloud/QuecCloud.html +> Quectel IoT management platform:https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonCloud/QuecCloud.html diff --git a/docs/Quick_start/en/file.md b/docs/Quick_start/en/file.md index 25d13b9182c10bd9563ff0d197a117559027fb2d..272eefda01a4fa59b2c279ac413f0d217dd7e13f 100644 --- a/docs/Quick_start/en/file.md +++ b/docs/Quick_start/en/file.md @@ -7,7 +7,7 @@ Revision History ## Read/Write file illustration -In this document, it mainly introduces several methods related to read/write of QuecPython file, which 啊are applicable to all modules that supporting QuecPython development. +In this document, it mainly introduces several methods related to read/write of QuecPython file, which are applicable to all modules that supporting QuecPython development. ## Basic concept of file diff --git a/docs/Quick_start/en/timer.md b/docs/Quick_start/en/timer.md index 6869602b7a44008be6e845816e7303ca73c6c706..e836a3973ef29ef6f7557350d3e4336b3073ee12 100644 --- a/docs/Quick_start/en/timer.md +++ b/docs/Quick_start/en/timer.md @@ -10,55 +10,6 @@ It mainly tells about how to use QuecPython_Timer based on EC600S, for the rest, they are just similar. In most cases, the timer is used for timing and counting, which can be used as precise delay processing, but also used to calculate the total number of pulses under the premise of connecting a clock source. In this article, you will learn all the settings of the Timer and how to use it. -## HW description - -Currently, 4 timers are available; as for details, please refer to the link: [HW support](https://python.quectel.com/doc/doc/Quecpython_intro/en/Qp_Product_intro/Hardware_Support.html) - -## SW design - -SW-related API, please refer to link: [Timer](https://python.quectel.com/wiki/#/en-us/api/QuecPythonClasslib?id=timer) - -### Constant illustration - -| Constant | Illustration | -| -------------- | --------------------------------------------------- | -| Timer.Timer0 | Timer0 | -| Timer.Timer1 | Timer1 | -| Timer.Timer2 | Timer2 | -| Timer.Timer3 | Timer3 | -| Timer.ONE_SHOT | One shot mode, the timer just executes for one time | -| Timer.PERIODIC | Periodic mode, the timer executes periodically | - -### Create Timer object - -timer = Timer(Timer) - -The port parameter for creating timer object is shown as next: - -| Parameter | Type | Illustration | -| --------- | ---- | ----------------------------------------------------- | -| Timer | int | Timer number, the EC600S supports Timer 0 to Timer 3. | - -### Start timer - -timer.start(period, mode, callback): - -Start corresponding timer. Here shows the port parameter. - -| Parameter | Type | Illustration | -| --------- | -------- | ------------------------------------------------------------ | -| period | int | Interrupt period, the unit is ms. | -| mode | int | Running mode, as for Timer. ONE_SHOT, the timer just executes one time; while for Timer.PERIODIC, the timer executes periodically. | -| callback | function | Timer execution function | - -Return value: if it is a success to start, it returns the integer 0, otherwise, it returns integer -1. - -### Stop timer - -timer.stop():Stop corresponding timer without parameter. - -Return value: if it is a success to start, it returns the integer 0, otherwise, it returns integer -1. - ## Interaction operation Interact with module via QPYcom. The next case is based on Timer0 and Timer1. As for Timer2 and Timer3, it is similar. @@ -69,9 +20,10 @@ Interact with module via QPYcom. The next case is based on Timer0 and Timer1. As
**Note** + 2. The reason to execute command ”from machine import Timer'' is to make the Timer module invisible in current space. -4. Only execute "from machine import Timer" command in module can the function and variate in Timer be used. -6. Please do remember above operations have on connection with any peripheral, it just serves as reference to get familiar with commands. +3. Only execute "from machine import Timer" command in module can the function and variate in Timer be used. +4. Please do remember above operations have on connection with any peripheral, it just serves as reference to get familiar with commands. @@ -123,3 +75,52 @@ This is just aimed at timer, as a result, there is no needed peripheral. +## HW description + +Currently, 4 timers are available; as for details, please refer to the link: [HW support](https://python.quectel.com/doc/doc/Quecpython_intro/en/Qp_Product_intro/Hardware_Support.html) + +## SW design + +SW-related API, please refer to link: [Timer](https://python.quectel.com/wiki/#/en-us/api/QuecPythonClasslib?id=timer) + +### Constant illustration + +| Constant | Illustration | +| -------------- | --------------------------------------------------- | +| Timer.Timer0 | Timer0 | +| Timer.Timer1 | Timer1 | +| Timer.Timer2 | Timer2 | +| Timer.Timer3 | Timer3 | +| Timer.ONE_SHOT | One shot mode, the timer just executes for one time | +| Timer.PERIODIC | Periodic mode, the timer executes periodically | + +### Create Timer object + +timer = Timer(Timer) + +The port parameter for creating timer object is shown as next: + +| Parameter | Type | Illustration | +| --------- | ---- | ----------------------------------------------------- | +| Timer | int | Timer number, the EC600S supports Timer 0 to Timer 3. | + +### Start timer + +timer.start(period, mode, callback): + +Start corresponding timer. Here shows the port parameter. + +| Parameter | Type | Illustration | +| --------- | -------- | ------------------------------------------------------------ | +| period | int | Interrupt period, the unit is ms. | +| mode | int | Running mode, as for Timer. ONE_SHOT, the timer just executes one time; while for Timer.PERIODIC, the timer executes periodically. | +| callback | function | Timer execution function | + +Return value: if it is a success to start, it returns the integer 0, otherwise, it returns integer -1. + +### Stop timer + +timer.stop():Stop corresponding timer without parameter. + +Return value: if it is a success to start, it returns the integer 0, otherwise, it returns integer -1. + diff --git a/docs/sbs/en/BSP/ADC.md b/docs/sbs/en/BSP/ADC.md index 9a8193f3363445c394b15c354e0dc6b20523b76d..34be098def7b6d71fd936a177072ee357950f669 100644 --- a/docs/sbs/en/BSP/ADC.md +++ b/docs/sbs/en/BSP/ADC.md @@ -10,6 +10,57 @@ In this document, it mainly illustrates based on EC600S_QuecPython_EVB. As for o In this chapter, it is recommended to integrate with photo-transistor test: [Phototransistor test](https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonSub/Photoresistor.html) +## Interaction operation + +The interaction with module can be carried out via QPYcom. The following case is based on ADC0. + +![](media/ADC_1.png) + +**Note** + +1. The command line "from misc import ADC" means making the ADC module visible in current space. +2. Only executing command "from misc import ADC" can the function and variate in ADC be used. +3. The above operation is conducted under the circumstance of connecting ADC0 to photo-transistor. While as for ADC1, there is a need to connect peripheral to carry out relevant operations. + +## Download and verify + +### SW codes + +Download **.py** file into module and run. Here shows codes: Click to download code + +```python +from misc import ADC # Import ADC module +import utime # Import timing module +read_time = 5 # Set read count +adc = ADC() +while read_time: + adc.open() + read_data = adc.read(ADC.ADC0) + print(read_data) + adc.close() + read_time -= 1 + utime.sleep(1) # Postpone 1S +``` + +### HW connection + +Extra HW connection is not necessary. The ADC0 port on EC600S has been connected to photo-transistor externally. In this document, the downloading and verification is realized with the assist of photo-transistor. + +(If the ADC on some types of EC600N module is not available, please check the HW support via specific type. The available ADC module can download routine to run directly.) + +![](media/ADC_4.png) + +### Result + +1. Run *adc_file.py* in QPYcom. (At the same time, please make sure the sunlight received by photo-transistor is varied). Please check the following figure: + + ![](media/ADC_2.png) + + 2. Query outputted result in QPYcom interaction surface. (The value varies) + + +![](media/ADC_3.png) + ## HW Description Currently, 2 channels of ADC are available on EC600S module, please check the connection location as described below: @@ -20,8 +71,6 @@ For detailed ADC, please refer to [ADC-related API](https://python.quectel.com/w As for the HW schematic diagram of ADC, please check the HW design specification and EVB schematic diagram. -Anything unavailable, you can reach it on QQ group: 445121768. - ![](media/ADC_0.png) The corresponding relationship is shown as following tablet: @@ -64,52 +113,3 @@ adc.close(),No parameter Returned value: If success, it returns integer 0; otherwise, it returns integer -1. -## Interaction operation - -The interaction with module can be carried out via QPYcom. The following case is based on ADC0. - -![](media/ADC_1.png) - -**Note** - -1. The command line "from misc import ADC" means making the ADC module visible in current space. -3. Only executing command "from misc import ADC" can the function and variate in ADC be used. -5. The above operation is conducted under the circumstance of connecting ADC0 to photo-transistor. While as for ADC1, there is a need to connect peripheral to carry out relevant operations. - -## Download and verify - -### SW codes - -Download **.py** file into module and run. Here shows codes: Click to download code - -```python -from misc import ADC # Import ADC module -import utime # Import timing module -read_time = 5 # Set read count -adc = ADC() -while read_time: - adc.open() - read_data = adc.read(ADC.ADC0) - print(read_data) - adc.close() - read_time -= 1 - utime.sleep(1) # Postpone 1S -``` - -### HW connection - -Extra HW connection is not necessary. The ADC0 port on EC600S has been connected to photo-transistor externally. In this document, the downloading and verification is realized with the assist of photo-transistor. - -(If the ADC on some types of EC600N module is not available, please check the HW support via specific type. The available ADC module can download routine to run directly.) - -### Result - -1. Run *adc_file.py* in QPYcom. (At the same time, please make sure the sunlight received by photo-transistor is varied). Please check the following figure: - - ![](media/ADC_2.png) - - 2. Query outputted result in QPYcom interaction surface. (The value varies) - - -![](media/ADC_3.png) - diff --git a/docs/sbs/en/BSP/I2C.md b/docs/sbs/en/BSP/I2C.md index b5fc012b6833ecb6242eaae17d45d3dcfe52b241..cd2fe5c7ded59534ad45e980763d6b3f01c0d267 100644 --- a/docs/sbs/en/BSP/I2C.md +++ b/docs/sbs/en/BSP/I2C.md @@ -8,13 +8,17 @@ In this document, it mainly illustrates how to use QuecPython I2C module. -Also, in this document, it tells how to use th QuexPython I2C Library. For more basic knowledge, please refer to the **I2C** on your own via Baidu- A browser like Google. +### Quick start -**I2C**, also named **IIC**, is the abbreviation of **Inter-Integrated-Circuit**. As for the Chinese meaning, it is integrated circuit bus. +2. About specific API of QuecPython I2C, please refer to [I2C.](https://python.quectel.com/wiki/#/en-us/api/QuecPythonClasslib?id=i2c) +3. About the application test of I2C, please refer to integrated humidity and temperature sensor: [Internal temperature and humidity sensor experiment.](https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonSub/i2c_aht.html) +4. About the application test of I2C, it is also valid to refer to [Acceleration sensor experiment.](https://python.quectel.com/doc/doc/Advanced_development/en/QuecPythonSub/i2c_lis2dh.html) ### Brief introduction on I2C. -Please refer to the [I2C Bus](https://baike.baidu.com/item/I2C%E6%80%BB%E7%BA%BF). No more info will be illustrated here. +In this document, it tells how to use th QuexPython I2C Library. For more basic knowledge,please search *I2C* yourself. + +**I2C**, also named **IIC**, is the abbreviation of **Inter-Integrated-Circuit**. It is integrated circuit bus. ### The base of I2C protocol E. g. When writing data to Slave by Master, the basic structure is shown as following figure. @@ -47,8 +51,3 @@ Several methods are covered in common I2C bus - Write assigned peripheral, starting address and data of certain length - Trigger some behavior via writing the specific register of assigned peripheral, then wait the peripheral returns data. -### Quick start - -2. About specific API of QuecPython I2C, please refer to [QuecPython-machine - HW-related functions-I2C](https://python.quectel.com/wiki/#/zh-cn/api/QuecPythonClasslib?id=i2c) -4. About the application test of I2C, please refer to integrated humidity and temperature sensor: [Integrated humidity and temperature sensor test](https://python.quectel.com/doc/doc/Advanced_development/zh/QuecPythonSub/i2c_aht.html) -6. About the application test of I2C, it is also valid to refer to [Accelerometers Test.](https://python.quectel.com/doc/doc/Advanced_development/zh/QuecPythonSub/i2c_lis2dh.html) diff --git a/docs/sbs/en/BSP/media/ADC_4.png b/docs/sbs/en/BSP/media/ADC_4.png new file mode 100644 index 0000000000000000000000000000000000000000..4788f1bb244136fdcdc401967063eb509b90cd02 Binary files /dev/null and b/docs/sbs/en/BSP/media/ADC_4.png differ diff --git a/docs/sbs/en/BSP/media/Qp_Advanced_development_QuecPythonSub_i2c_bus_03.png b/docs/sbs/en/BSP/media/Qp_Advanced_development_QuecPythonSub_i2c_bus_03.png deleted file mode 100644 index 66c80f3ab17fe5a58334607a4b4fe9e274d24d33..0000000000000000000000000000000000000000 Binary files a/docs/sbs/en/BSP/media/Qp_Advanced_development_QuecPythonSub_i2c_bus_03.png and /dev/null differ diff --git a/docs/sbs/en/BSP/media/Qp_Advanced_development_QuecPythonSub_i2c_bus_04.png b/docs/sbs/en/BSP/media/Qp_Advanced_development_QuecPythonSub_i2c_bus_04.png deleted file mode 100644 index 816e95f9e6a218ac6409a21e5f6a2a0ace0d0c24..0000000000000000000000000000000000000000 Binary files a/docs/sbs/en/BSP/media/Qp_Advanced_development_QuecPythonSub_i2c_bus_04.png and /dev/null differ diff --git a/docs/sbs/en/BSP/media/media_I2C_01(E).png b/docs/sbs/en/BSP/media/media_I2C_01(E).png new file mode 100644 index 0000000000000000000000000000000000000000..2a51f605ad3531ad5f32173cf1c1c3fae1bf0312 Binary files /dev/null and b/docs/sbs/en/BSP/media/media_I2C_01(E).png differ diff --git a/docs/sbs/en/BSP/media/media_I2C_02(E).png b/docs/sbs/en/BSP/media/media_I2C_02(E).png new file mode 100644 index 0000000000000000000000000000000000000000..12602e10cfe29c54d4ccb91b0d2b33e9bb57b609 Binary files /dev/null and b/docs/sbs/en/BSP/media/media_I2C_02(E).png differ diff --git a/docs/sbs/en/QuecPythonWirelessNetwork/DataCall.md b/docs/sbs/en/QuecPythonWirelessNetwork/DataCall.md index 514cacc384c49787060baa0af51bd02f8107f063..2647f6dec94b0fa4c43c60397f138d3eb5ffbfd8 100644 --- a/docs/sbs/en/QuecPythonWirelessNetwork/DataCall.md +++ b/docs/sbs/en/QuecPythonWirelessNetwork/DataCall.md @@ -14,60 +14,6 @@ Provide relevant port to datacall, start, configure and query the access mode us For detailed API, please refer to the [Quecpython - DataCall](https://python.quectel.com/wiki/#/en-us/api/QuecPythonClasslib?id=datacall-data-call) -## Brief introduction on data call - -To be brief, the data call is a process that building connection with server and getting network access permission via call. As for terminal device, it is to configure APN. - -### About APN - -APN, a network access technology and a parameter should be configured when the terminal gets access to network, decides which method would be used to get access to network from the view of terminal. - -In terms of user, there are many peripheral networks can be accessed such as Internet, WAP website, internal network of group and specific network for internal industry. However, different access points are varied in access range and methods. So, in terms of network end, how to learn about which network will be accessed and corresponding IP will be allocated after the terminal is activated? It is the APN that used to differentiate. That is, APN determines which access mode a user terminal uses to access network. - -All operators will use specific APN (Access Point Name), which will be reserved in your SIM card beforehand. If necessary, you should adjust it manually. - -### Implication of APN - -The APN will decide which access mode that a terminal uses to access network so as to identify the service type of GPRS. - -Two categories of APN - -- *WAP* service -- Service not included in *WAP*, such as connecting to Internet - -From the view of operator, APN just refers to one logic name. In most cases, the APN is arranged on GGSN device or connected to the GNSS in a logic way. When user gets access to network via GPRS, it will agent peripheral network via *GGSN*. Therefore, the parameters related to APN setting, filtering and calculating have become one of the most significant parameters to GPRS billing and expense. (As the APN can be used to differentiate the service or the external network) - -The overall illustrations of APN have been defined in the *TS23.003 Clause 9 of 3GPP* specification explicitly. - -### APN structure - -The name of APN access point is composed by two parts: - -- Network identifier - -- Operator identifier - - Similarly, the operator identifier is also composed by two parts: - -- Mobile network code(MNC) - -- Mobile country code(MCC) - -### APN type - -We can divide the APN into four types according to whether it is connected to public network or special network as well as the allocation method of IP address. - -- **Public APN**, abbreviated as APN also. The device which is connected to network gate via public APN will get IP address in dynamic in convenience of access to network by the most. -- **Public APN with static IP address** - The network gate will allocate static IP address to device according to the available IP addresses in public network. -- **Special APN**- It is commonly considered as "APN with VPN". The device with special APN configuration can get access to its inner network via network gate. -- **The special APN with static IP address** - The network gate will allocate static IP address to device according to the available IP addresses in special network. - -Compared with public APN, there is even no need in network connection for special APN. Moreover, under no circumstance shall the special network allow itself to get access to public network but also keep itself in the basic structure of cellular network to make sure the safe data handling. - -### Configure APN - -For QuecPython, you can use the default APN in SIM card or configure APN manually. It is also available to configure APN by calling API function. - ## Quick Start ### Operation procedure @@ -174,6 +120,60 @@ Result ![](media/datacall_result.png) +## Brief introduction on data call + +To be brief, the data call is a process that building connection with server and getting network access permission via call. As for terminal device, it is to configure APN. + +### About APN + +APN, a network access technology and a parameter should be configured when the terminal gets access to network, decides which method would be used to get access to network from the view of terminal. + +In terms of user, there are many peripheral networks can be accessed such as Internet, WAP website, internal network of group and specific network for internal industry. However, different access points are varied in access range and methods. So, in terms of network end, how to learn about which network will be accessed and corresponding IP will be allocated after the terminal is activated? It is the APN that used to differentiate. That is, APN determines which access mode a user terminal uses to access network. + +All operators will use specific APN (Access Point Name), which will be reserved in your SIM card beforehand. If necessary, you should adjust it manually. + +### Implication of APN + +The APN will decide which access mode that a terminal uses to access network so as to identify the service type of GPRS. + +Two categories of APN + +- *WAP* service +- Service not included in *WAP*, such as connecting to Internet + +From the view of operator, APN just refers to one logic name. In most cases, the APN is arranged on GGSN device or connected to the GNSS in a logic way. When user gets access to network via GPRS, it will agent peripheral network via *GGSN*. Therefore, the parameters related to APN setting, filtering and calculating have become one of the most significant parameters to GPRS billing and expense. (As the APN can be used to differentiate the service or the external network) + +The overall illustrations of APN have been defined in the *TS23.003 Clause 9 of 3GPP* specification explicitly. + +### APN structure + +The name of APN access point is composed by two parts: + +- Network identifier + +- Operator identifier + + Similarly, the operator identifier is also composed by two parts: + +- Mobile network code(MNC) + +- Mobile country code(MCC) + +### APN type + +We can divide the APN into four types according to whether it is connected to public network or special network as well as the allocation method of IP address. + +- **Public APN**, abbreviated as APN also. The device which is connected to network gate via public APN will get IP address in dynamic in convenience of access to network by the most. +- **Public APN with static IP address** - The network gate will allocate static IP address to device according to the available IP addresses in public network. +- **Special APN**- It is commonly considered as "APN with VPN". The device with special APN configuration can get access to its inner network via network gate. +- **The special APN with static IP address** - The network gate will allocate static IP address to device according to the available IP addresses in special network. + +Compared with public APN, there is even no need in network connection for special APN. Moreover, under no circumstance shall the special network allow itself to get access to public network but also keep itself in the basic structure of cellular network to make sure the safe data handling. + +### Configure APN + +For QuecPython, you can use the default APN in SIM card or configure APN manually. It is also available to configure APN by calling API function. + ## Referential materials [What is Access Point Name (APN)](https://1ot.mobi/resources/blog/iot-hacking-series-3-what-is-access-point-name-apn-and-how-it-works)