diff --git a/docs/Advanced_development/en/QuecPythonSub/Digital_tube.md b/docs/Advanced_development/en/QuecPythonSub/Digital_tube.md index d8e11944e98ff686af8aec922f0c9756ead61ad9..434e149039600852485d4256cb8dfeb79ef0dc11 100644 --- a/docs/Advanced_development/en/QuecPythonSub/Digital_tube.md +++ b/docs/Advanced_development/en/QuecPythonSub/Digital_tube.md @@ -3,12 +3,13 @@ |Version | date | author | change statement| | ---- | ---------- | ------ | -------- | |1.0 | 2021-09-23 | Kayden | initial version| +|1.1 | 2022-03-25 | Kayden | Documentation and code optimization | ## Nixie tube development experiment -This article is based on ec600x_ QuecPython_ EVB_ V1.3 development board carries out nixie tube development experiment, and the directly applicable modules are ec600s, ec600n and ec600u. +This article is based on ec600x_ QuecPython_ EVB_ V1.3 development board carries out nixie tube development experiment, and the directly applicable modules are ec600s, ec600n and ec600u.Other modules and development boards need less modification to apply, please contact us if you have any questions. ## Hardware resources @@ -16,9 +17,11 @@ The hardware resource of the module used in this experiment is only GPIO. Becaus Schematic diagram of four digit nixie tube module with anode: +On the Common Anodedigital tube and 74HC595 driver chip related information can be searched in the Internet, the information is relatively rich. + ![](media/Schematic_diagram_of_nixie_tube_module.png) -In this experiment, in order to achieve the universality of wiring between development boards equipped with different modules, the wiring is connected to the fixed pin pin. The specific connection and the corresponding software GPIO number of the pin are shown in the table below. +In this experiment, in order to achieve the universality of wiring between development boards equipped with different modules, the wiring is connected to the fixed pin pin. The specific connection and the corresponding software GPIO number of the pin are shown in the table below.You can also obtain this information using schematics and [GPIO related API](https://python.quectel.com/wiki/#/en-us/api/QuecPythonClasslib?id=pin). |Nixie tube module pin name | v1.3 development board pin name and module pin number | ec600s / ec600n GPIO | ec600u GPIO| | ------------------ | ------------------------------ | ------------------ | ----------- | @@ -28,8 +31,6 @@ 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/#/en-us/api/QuecPythonClasslib?id=pin) - ## Experimental code download the code @@ -107,5 +108,5 @@ Finally, we can see that four nixie tubes cycle to display 17 font patterns. Som ![](media/Digital_tube_experiment_phenomenon.png) -More information about the use of nixie tubes can be found in Baidu. +More information on how to use nixie tubes can be found on the Internet. diff --git a/docs/Advanced_development/en/QuecPythonSub/Photoresistor.md b/docs/Advanced_development/en/QuecPythonSub/Photoresistor.md index bb4f9c12f24919ce849a380163497e82a19bcad5..98080df9048fb3e44e00dc61011f8e596a9f2171 100644 --- a/docs/Advanced_development/en/QuecPythonSub/Photoresistor.md +++ b/docs/Advanced_development/en/QuecPythonSub/Photoresistor.md @@ -3,12 +3,50 @@ |Version | date | author | change statement| | ---- | ---------- | ------ | ------------ | |1.0 | 2021-09-15 | Kayden | initial version revision| +|1.1 | 2022-03-21 | Kayden | Document optimization and adjustment | ## Photosensitive sensor experiment -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. +This article mainly introduces EC600U 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. + +### Hardware resources + +EC600U leads out four ADC interfaces. Refer to EC600X_QuecPython_EVB_V2.0_SCH.pdf document. + +Other development boards refer to the corresponding schematic documents, which can be downloaded from the [download center.](https://python.quectel.com/download) + +![](media/photoresistor_1.png) + +| Peripheral | Pin | +| ---------- | ---- | +| ADC0 | 19 | +| ADC1 | 20 | +| ADC2 | 113 | +| ADC3 | 114 | + +**Note: the specific correspondence of each module is described in detail in the API introduction,combine the pin numbers in the schematic or hardware design manual** + +The ADC0 is connected to a photoresistor as shown below: + +![](media/photoresistor_2.png) + +### Photosensitive resistance experiment + +#### Experimental design + +Design an experiment to print the resistance of the current photoresist in real time according to the current light intensity. The following figure is the schematic diagram of photoresist. + +![](media/photoresistor_3.png) + +ADC0 is the voltage point we can test with ADC peripherals. + +![](media/photoresistor_4.png) + +Finally, the R22 resistance can be calculated according to the following formula. + +![](media/photoresistor_5.png) #### Experimental code @@ -78,70 +116,7 @@ Finally, we can see in the serial port that the resistance output changes as fol -### Hardware resources - -Ec600s leads out two ADC interfaces. Refer to ec600s_ QuecPython_ EVB_ V1.0_ Sch.pdf document. - -Other development boards refer to the corresponding schematic documents, which can be downloaded from the download center or QQ group: [download center](https://python.quectel.com/download) - -QQ group: 445121768 - -![](media/photoresistor_1.png) - -|Peripheral pin| -| ---- | ---- | -| ADC0 | 19 | -| ADC1 | 20 | - -**Note: the specific correspondence of each module is described in detail in the API introduction** - -And a photoresist is provided. - -![](media/photoresistor_2.png) - -### Software resources - -#### Create ADC object - -**ADC()** - -Returns an ADC object. - -#### Open device – open - -ADC function initialization. - -parameter - -nothing - -Return value - -The integer 0 is returned successfully, and the integer - 1 is returned in case of failure. - -#### Read voltage value – read - -Read the voltage value of the specified channel, in mV. - -parameter - -|Parameter | parameter type | parameter description| -| ---- | -------- | ------------------------------------------- | -|Adcn | int | ec600 platform: ADC0 – pin No. 19 ADC1 – pin No. 20| - -#### Turn off the device – close - -Turn off the ADC. - -Parameter: None - -Return value: - -0 successfully closed, - 1 failed to close. - -### Photosensitive resistance experiment - -#### Principle of photoresist +#### Introduction to photosensitive resistor principle definition: @@ -159,20 +134,6 @@ Photoresistors are very sensitive to light. The stronger the light, the lower th The relationship between the spectral sensitivity of the photosensitive sensor and the incident light intensity is called the illumination characteristic. Sometimes, the relationship between the output voltage or current of the photosensitive sensor and the incident light intensity is also called the illumination characteristic. -#### Experimental design - -Design an experiment to print the resistance of the current photoresist in real time according to the current light intensity. The following figure is the schematic diagram of photoresist. - -![](media/photoresistor_3.png) - -ADC0 is the voltage point we can test with ADC peripherals. - -![](media/photoresistor_4.png) - -Finally, the R22 resistance can be calculated according to the following formula. - -![](media/photoresistor_5.png) - ### Professional terms diff --git a/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_1.png b/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_1.png index 65636edf0a30432d20f7c0490115dc72a0bfc756..108797d2b0241d069778a97f819f3f10255b2457 100644 Binary files a/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_1.png and b/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_1.png differ diff --git a/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_2.png b/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_2.png index e17acdc3b127124a1d32f156c6c58ed2a324358b..d50d7533803c9b729e999a4bc4e3a771f52cb2cf 100644 Binary files a/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_2.png and b/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_2.png differ diff --git a/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_3.png b/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_3.png index cb47d1bb9d5cb19935e88f503ad0a039d6467022..a4194b59ca632f257f1f0b44733eff9d62ffcf75 100644 Binary files a/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_3.png and b/docs/Advanced_development/en/QuecPythonSub/media/photoresistor_3.png differ diff --git a/docs/Advanced_development/zh/QuecPythonSub/Digital_tube.md b/docs/Advanced_development/zh/QuecPythonSub/Digital_tube.md index cbfd3b5ca727110c053a7ae66d542914c0ba48c2..50676db69ecb137143217f5ea01325e46a254a14 100644 --- a/docs/Advanced_development/zh/QuecPythonSub/Digital_tube.md +++ b/docs/Advanced_development/zh/QuecPythonSub/Digital_tube.md @@ -1,14 +1,15 @@ ## 修订历史 -| 版本 | 日期 | 作者 | 变更表述 | -| ---- | ---------- | ------ | -------- | -| 1.0 | 2021-09-23 | Kayden | 初始版本 | +| 版本 | 日期 | 作者 | 变更表述 | +| ---- | ---------- | ------ | ------------------ | +| 1.0 | 2021-09-23 | Kayden | 初始版本 | +| 1.1 | 2022-03-25 | Kayden | 文档及代码优化调整 | ## 数码管开发实验 -本篇文章主要简介基于EC600X_QuecPython_EVB_V1.3开发板进行数码管开发实验,直接适用的模组为EC600S、EC600N、EC600U。 +本篇文章主要简介基于EC600X_QuecPython_EVB_V1.3开发板进行数码管开发实验,直接适用的模组为EC600S、EC600N、EC600U,其他模组及开发板仅需要较少的修改即可适用,如有疑问请与我们联系。 ## 硬件资源 @@ -16,9 +17,11 @@ 共阳极四位数码管模块原理图: +关于共阳极数码管和74HC595驱动芯片相关资料可自行在互联网中搜索,资料比较丰富。 + ![](media/Schematic_diagram_of_nixie_tube_module.png) -本实验为了尽量做到搭载不同模组的开发板之间接线的通用性,接线均接在固定的排针脚,具体连接情况以及排针对应软件GPIO号情况见下表。 +本实验为了尽量做到搭载不同模组的开发板之间接线的通用性,接线均接在固定的排针脚,具体连接情况以及排针对应软件GPIO号情况见下表,或自行使用原理图并结合[GPIO相关API](https://python.quectel.com/wiki/#/zh-cn/api/QuecPythonClasslib?id=pin)获取相关信息。 | 数码管模块排针名称 | V1.3开发板排针名称及模组引脚号 | EC600S/EC600N GPIO | EC600U GPIO | | ------------------ | ------------------------------ | ------------------ | ----------- | @@ -28,8 +31,6 @@ | DIO | P60 | GPIO13 | GPIO4 | | GND | GND | - | - | -注:模组引脚对应软件GPIO号查看链接:[GPIO相关API](https://python.quectel.com/wiki/#/zh-cn/api/QuecPythonClasslib?id=pin) - ## 实验代码 下载代码 @@ -63,9 +64,6 @@ 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 - LED_fonts = (0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8, 0x80, 0x90, 0x88, 0x83, 0xC6, 0xA1, 0x86, 0x8E, 0xBF)