diff --git a/en/peripherals/machine.Pin.md b/en/peripherals/machine.Pin.md index 2ea1b89046a8cfb5c2d4d59e8ead5b4932681f8b..4dd4138976cc5e2049d766eea43a4fa52cd7962e 100644 --- a/en/peripherals/machine.Pin.md +++ b/en/peripherals/machine.Pin.md @@ -46,7 +46,7 @@ gpio1.get_dir() - + **Example:** ```python @@ -1201,7 +1201,7 @@ gpio1.get_dir() - +
@@ -1680,11 +1680,11 @@ gpio1.get_dir() - + - + @@ -1960,8 +1960,7 @@ gpio1.get_dir()
GPIO number
GPIO21Pin86(EG810M_EU不支持)Pin86(EG810M_EU unsupported)
GPIO22Pin87(EG810M_EU不支持)Pin87(EG810M_EU unsupported)
GPIO23
- - +
@@ -1969,323 +1968,319 @@ gpio1.get_dir() + + + + + + + + + + + + - + - + - + - + - + - + - + - + + + + + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + - + - + - - - - - - - - - - - - - - - - + - - + + - + - + - - + + - - + + - + + + + + - + - + - + + + + +
GPIO number
Note:
1.I&PU: In the input mode, only the floating and pull-up modes are supported
2.I&PD: In the input mode, only floating and drop-down modes are supported
3. The ExtInt function of the EC600E does not support both rising and falling edges to trigger an interrupt
GPIO1Pin4(It cannot be used together with GPIO40)Pin10(I&PU)
GPIO2Pin5(It cannot be used together with GPIO36)Pin11(57)(I&PU)(It cannot be used together with GPIO41)
GPIO3Pin6(It cannot be used together with GPIO35)Pin12(56)(I&PU)(It cannot be used together with GPIO40)
GPIO4Pin7(It cannot be used together with GPIO8)Pin13(I&PU)
GPIO5Pin18Pin14(I&PU)
GPIO6Pin19Pin15(I&PU)
GPIO7Pin1(It cannot be used together with GPIO19)Pin16(I&PU)
GPIO8Pin16(It cannot be used together with GPIO4)Pin39(I&PD)
GPIO9Pin40(I&PU)
GPIO10Pin26(EG912UGuLAA unsupported)Pin48(I&PD)
GPIO11Pin27(It cannot be used together with GPIO31)Pin58(I&PD)
GPIO12Pin28(It cannot be used together with GPIO29)Pin59(I&PD)
GPIO13Pin40Pin60(I&PD)(It cannot be used together with GPIO36)
GPIO14Pin41Pin61(I&PD)
GPIO15Pin64(EG912UGLAA unsupported)Pin62(I&PU)(EC600ECN_LE&LQ Unavailable)
GPIO16Pin20(It cannot be used together with GPIO28)Pin63(I&PD)(EC600ECN_LE&LQ Unavailable)
GPIO17Pin21Pin69(I&PU)(EC600ECN_LE&LQ Unavailable)
GPIO18Pin30Pin70(I&PU)(EC600ECN_LE&LQ Unavailable)
GPIO19Pin108(It cannot be used together with GPIO7)
GPIO20Pin88(EG912UGLAA unsupported)
GPIO21Pin36(It cannot be used together with GPIO39)
GPIO22Pin37(It cannot be used together with GPIO30)Pin50(I&PD)
GPIO23Pin38Pin51(I&PD)
GPIO24Pin39Pin52(I&PD)
GPIO25Pin42(It cannot be used together with GPIO26)
GPIO26Pin78(It cannot be used together with GPIO25)
GPIO27Pin83(It cannot be used together with GPIO32)
GPIO28Pin92(It cannot be used together with GPIO16)
GPIO29Pin95(It cannot be used together with GPIO12)Pin53(I&PD)
GPIO30Pin111(It cannot be used together with GPIO22)GPIO26Pin54(I&PD)
GPIO31Pin97(It cannot be used together with GPIO11)Pin66(I&PU)(EC600ECN_LE&LQ Unavailable)
GPIO32Pin98(It cannot be used together with GPIO27)Pin65(I&PU)(EC600ECN_LE&LQ Unavailable)
GPIO34Pin104GPIO33Pin67(I&PU)(EC600ECN_LE&LQ Unavailable)
GPIO35Pin105(It cannot be used together with GPIO3)GPIO34Pin64(I&PU)(EC600ECN_LE&LQ Unavailable)
GPIO36Pin106(It cannot be used together with GPIO2)Pin31(I&PU)(It cannot be used together with GPIO13)
GPIO37Pin32(I&PU)
GPIO38Pin114Pin33(I&PU)
GPIO39Pin115(It cannot be used together with GPIO21)Pin34(I&PU)
GPIO40Pin116(It cannot be used together with GPIO1)Pin71(I&PU)(It cannot be used together with GPIO3)
GPIO41Pin72(I&PU)(It cannot be used together with GPIO2)
- +
+ - - - - + - + - + - + - + - + - + - + - + + - - - + + - + + - + + - + + - -
GPIO number Pin number
Pin6
Pin7Note:
Pin81.I&PU: In the input mode, only the floating and pull-up modes are supported
Pin92.I&PD: In the input mode, only floating and drop-down modes are supported
Pin143.EC800ECN_LE&LQ&CG Unavailable: The pin of this model module is suspended internally, so it cannot be used
Pin154. Pin67, Pin66, Pin57, and Pin58 of the module share the same internal IO, that is, when the level of GPIO13 is changed, Pin57 and Pin67 will change simultaneously
Pin165. On the module of EC800ECN_LE&LQ&CG model, Pin57 and Pin58 are suspended internally, so only Pin67 and Pin66 can be used as GPIO13 and 14
Pin276. The ExtInt function of the EC800E does not support the simultaneous rise and fall of the ExTINt edge
Pin287.Pin55, 80, and 81 cannot be used with Pin64, 63, and 62 (SIM2 pins), respectively
Pin29GPIO1Pin30(I&PD)
Pin30
Pin31GPIO2Pin31(I&PD)
Pin34GPIO3Pin32(I&PD)
Pin35GPIO4Pin33(I&PD)(It cannot be used together with GPIO25)
Pin37GPIO5Pin49(I&PD)(EC800ECN_LE&LQ&CG Unavailable)
- - - - + + - - - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - - - + + - + + - + + - - + + - + + - -
Pin numberGPIO6Pin50(I&PU)(EC800ECN_LE&LQ&CG Unavailable)
Pin6GPIO7Pin51(I&PU)(EC800ECN_LE&LQ&CG Unavailable)
Pin7GPIO8Pin52(I&PU)(EC800ECN_LE&LQ&CG Unavailable)
Pin8GPIO9Pin53(I&PU)(EC800ECN_LE&LQ&CG Unavailable)
Pin9GPIO10Pin54(I&PU)(EC800ECN_LE&LQ&CG Unavailable)
Pin10GPIO11Pin55(I&PU)(EC800ECN_LE&LQ&CG Unavailable,It cannot be used together with Pin64)
Pin12GPIO12Pin56(I&PU)(EC800ECN_LE&LQ&CG Unavailable)
Pin13GPIO13Pin57(67)(I&PU)(EC800ECN_LE&LQ&CG pin number 57 cannot be used)(It cannot be used together with GPIO34)
Pin14GPIO14Pin58(66)(I&PU)(EC800ECN_LE&LQ&CG Pin number 58 cannot be used)(It cannot be used together with GPIO35)
Pin15GPIO15Pin80(I&PU)(EC800ECN_LE&LQ&CG Unavailable,It cannot be used together with Pin64)
Pin16GPIO16Pin81(I&PU)(EC800ECN_LE&LQ&CG Unavailable,It cannot be used together with Pin64)
Pin19
Pin20GPIO17Pin25(I&PD)
Pin21GPIO25Pin17(I&PU)(It cannot be used together with GPIO4)
Pin22GPIO26Pin18(I&PU)
Pin23GPIO27Pin19(I&PD)
Pin29GPIO28Pin20(I&PU)
- - - - - + + - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
GPIO numberPin numberGPIO29Pin21(I&PD)
GPIO1Pin12GPIO30Pin22(I&PU)
GPIO2Pin13GPIO31Pin23(I&PU)
GPIO3Pin41GPIO32Pin28(I&PU)
GPIO4Pin42GPIO33Pin29(I&PU)
GPIO5Pin21GPIO34Pin38(I&PU)(It cannot be used together with GPIO13)
GPIO6Pin22GPIO35Pin39(I&PU)(It cannot be used together with GPIO14)
GPIO7Pin23GPIO36Pin16(I&PD)
GPIO8Pin24GPIO37Pin78(I&PU)(EC800ECN_LE&LQ&CG Unavailable)
GPIO9Pin26GPIO38Pin85(I&PD)(EC800ECN_LE&LQ&LC&CG Unavailable)
GPIO10Pin43GPIO39Pin108(I&PD)(EC800ECN_LE&LQ&LC&CG Unavailable)
GPIO11Pin44GPIO40Pin109(I&PD)(EC800ECN_LE&LQ&LC&CG Unavailable)
- +
@@ -2293,323 +2288,2103 @@ gpio1.get_dir() + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - - + + - -
GPIO number
Note:
1. When AGPIO is in sleep mode, the level state remains unchanged, while the level of ordinary GPIO cannot be maintained during sleep
2.GPIO27, GPIO39, and GPIO40 have weak driving capabilities, so it is recommended to use them only as input pins
GPIO1Pin12Pin30
GPIO2Pin13Pin31
GPIO3Pin41Pin32
GPIO4Pin42Pin33
GPIO5Pin21Pin49
GPIO6Pin22Pin50
GPIO7Pin23Pin51
GPIO8Pin24Pin52
GPIO9Pin26Pin53
GPIO10Pin43Pin54
GPIO11Pin44GPIO12Pin56
- - - - - + + - - - - + + - - + + - - + + - - + + - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin numberGPIO13Pin57
GPIO1Pin4GPIO14Pin58
GPIO2Pin5GPIO17Pin25(AGPIO)
GPIO3Pin6GPIO23Pin66(It cannot be used together with GPIO26)
GPIO4Pin7GPIO24Pin67(It cannot be used together with GPIO25)
GPIO5Pin18GPIO25Pin17(It cannot be used together with GPIO24)
GPIO26Pin18(It cannot be used together with GPIO23)
GPIO6GPIO27Pin19(AGPIO, the driving ability is weak, it is recommended to use only as an input pin)
GPIO28Pin20(AGPIO)
GPIO29Pin21(AGPIO)
GPIO30Pin22
GPIO31Pin23
GPIO32Pin28
GPIO33Pin29
GPIO34Pin38
GPIO35Pin39
GPIO36Pin16(AGPIO)
GPIO37Pin78
GPIO38Pin85(AGPIO)
GPIO39Pin108(AGPIO, the driving ability is weak, it is recommended to use only as an input pin)
GPIO40Pin109(AGPIO, the driving ability is weak, it is recommended to use only as an input pin)
GPIO41Pin101
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin number
GPIO1Pin61(It cannot be used together with GPIO24)
GPIO2Pin58(It cannot be used together with GPIO25)
GPIO3Pin34
GPIO4Pin60
GPIO5Pin69(It cannot be used together with GPIO10)
GPIO6Pin70(It cannot be used together with GPIO11)
GPIO7Pin123
GPIO8Pin132
GPIO9Pin9
GPIO10Pin1(It cannot be used together with GPIO5)
GPIO11Pin4(It cannot be used together with GPIO6)
GPIO12Pin3
GPIO13Pin2
GPIO14Pin54
GPIO15Pin57
GPIO16Pin56
GPIO17Pin12
GPIO18Pin33
GPIO19Pin124(It cannot be used together with GPIO37)
GPIO20Pin104
GPIO21Pin103
GPIO22Pin48
GPIO23Pin39(It cannot be used together with GPIO46)
GPIO24Pin40(It cannot be used together with GPIO1)
GPIO25Pin49(It cannot be used together with GPIO2)
GPIO26Pin50(It cannot be used together with GPIO30)
GPIO27Pin53
GPIO28Pin52
GPIO29Pin51
GPIO30Pin59(It cannot be used together with GPIO26)
GPIO31Pin66
GPIO32Pin63
GPIO33Pin67
GPIO34Pin65
GPIO35Pin137
GPIO36Pin62
GPIO37Pin105(It cannot be used together with GPIO19)
GPIO38Pin106
GPIO39Pin107
GPIO40Pin126
GPIO41Pin120
GPIO42Pin16
GPIO43Pin10
GPIO44Pin14
GPIO45Pin64
GPIO46Pin13(It cannot be used together with GPIO23)
GPIO47Pin116
GPIO48Pin31
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin number
GPIO1Pin30(It cannot be used together with GPIO45)
GPIO2Pin31(It cannot be used together with GPIO46)
GPIO3Pin32(It cannot be used together with GPIO47)
GPIO4Pin33(It cannot be used together with GPIO48)
GPIO5Pin49
GPIO6Pin50(It cannot be used together with GPIO50)
GPIO7Pin51
GPIO8Pin52
GPIO9Pin53
GPIO10Pin54
GPIO11Pin55
GPIO12Pin25
GPIO13Pin57(It cannot be used together with GPIO49)
GPIO14Pin58(It cannot be used together with GPIO20)
GPIO15Pin84
GPIO16Pin81
GPIO17Pin76(It cannot be used together with GPIO35)
GPIO18Pin77
GPIO19Pin82
GPIO20Pin83(It cannot be used together with GPIO14)
GPIO21Pin86(It cannot be used together with GPIO34)
GPIO22Pin87
GPIO23Pin66
GPIO24Pin67
GPIO25Pin17
GPIO26Pin18
GPIO27Pin19
GPIO28Pin20
GPIO29Pin21
GPIO30Pin22
GPIO31Pin23
GPIO32Pin28
GPIO33Pin29
GPIO34Pin38(It cannot be used together with GPIO21)
GPIO35Pin39(It cannot be used together with GPIO17)
GPIO36Pin16
GPIO37Pin78
GPIO38Pin85
GPIO39Pin68
GPIO40Pin69
GPIO41Pin80(It cannot be used together with GPIO44)
GPIO42Pin107
GPIO43Pin103
GPIO44Pin101(It cannot be used together with GPIO41)
GPIO45Pin79(It cannot be used together with GPIO1)
GPIO46Pin100(It cannot be used together with GPIO2)
GPIO47Pin108(It cannot be used together with GPIO3)
GPIO48Pin109(It cannot be used together with GPIO4)
GPIO49Pin75(It cannot be used together with GPIO13)
GPIO50Pin74(It cannot be used together with GPIO6)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin number
GPIO1Pin4(It cannot be used together with GPIO40)
GPIO2Pin5(It cannot be used together with GPIO36)
GPIO3Pin6(It cannot be used together with GPIO35)
GPIO4Pin7(It cannot be used together with GPIO8)
GPIO5Pin18
GPIO6Pin19
GPIO7Pin1(It cannot be used together with GPIO19)
GPIO8Pin16(It cannot be used together with GPIO4)
GPIO10Pin26(EG912UGuLAA unsupported)
GPIO11Pin27(It cannot be used together with GPIO31)
GPIO12Pin28(It cannot be used together with GPIO29)
GPIO13Pin40
GPIO14Pin41
GPIO15Pin64(EG912UGLAA unsupported)
GPIO16Pin20(It cannot be used together with GPIO28)
GPIO17Pin21
GPIO18Pin30
GPIO19Pin108(It cannot be used together with GPIO7)
GPIO20Pin88(EG912UGLAA unsupported)
GPIO21Pin36(It cannot be used together with GPIO39)
GPIO22Pin37(It cannot be used together with GPIO30)
GPIO23Pin38
GPIO24Pin39
GPIO25Pin42(It cannot be used together with GPIO26)
GPIO26Pin78(It cannot be used together with GPIO25)
GPIO27Pin83(It cannot be used together with GPIO32)
GPIO28Pin92(It cannot be used together with GPIO16)
GPIO29Pin95(It cannot be used together with GPIO12)
GPIO30Pin111(It cannot be used together with GPIO22)
GPIO31Pin97(It cannot be used together with GPIO11)
GPIO32Pin98(It cannot be used together with GPIO27)
GPIO34Pin104
GPIO35Pin105(It cannot be used together with GPIO3)
GPIO36Pin106(It cannot be used together with GPIO2)
GPIO38Pin114
GPIO39Pin115(It cannot be used together with GPIO21)
GPIO40Pin116(It cannot be used together with GPIO1)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin number
GPIO1Pin10
GPIO2Pin11
GPIO3Pin12
GPIO4Pin13
GPIO5Pin14
GPIO6Pin15
GPIO7Pin16
GPIO8Pin39
GPIO9Pin40
GPIO10Pin48
GPIO11Pin58
GPIO12Pin59
GPIO13Pin60
GPIO14Pin61
GPIO15Pin62
GPIO16Pin63
GPIO17Pin69
GPIO18Pin70
GPIO19Pin1
GPIO20Pin3
GPIO21Pin49
GPIO22Pin50
GPIO23Pin51
GPIO24Pin52
GPIO25Pin53
GPIO26Pin54
GPIO27Pin55(boot pin, internal pull-up)
GPIO28Pin56
GPIO29Pin57
GPIO30Pin2
GPIO31Pin66
GPIO32Pin65
GPIO33Pin67
GPIO34Pin64
GPIO35Pin4
GPIO36Pin31
GPIO37Pin32
GPIO38Pin33
GPIO39Pin34
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin number
GPIO1Pin30
GPIO2Pin31
GPIO3Pin32
GPIO4Pin33
GPIO5Pin49
GPIO6Pin50
GPIO7Pin51
GPIO8Pin52
GPIO9Pin53
GPIO10Pin54(The EG800KCN is unavailable)
GPIO11Pin55(The EG800KCN is unavailable)
GPIO12Pin56(The EG800KCN is unavailable)
GPIO13Pin57(The EG800KCN is unavailable)
GPIO14Pin58(The EG800KCN is unavailable)
GPIO15Pin80(The EG800KCN is unavailable)
GPIO16Pin81
GPIO17Pin76
GPIO18Pin77
GPIO19Pin82
GPIO21Pin86
GPIO22Pin87
GPIO23Pin66
GPIO24Pin67
GPIO25Pin17
GPIO26Pin18
GPIO27Pin19
GPIO28Pin20
GPIO29Pin21
GPIO30Pin22
GPIO31Pin23
GPIO32Pin28(The EG800KCN is unavailable)
GPIO33Pin29(The EG800KCN is unavailable)
GPIO36Pin16
GPIO37Pin78
GPIO38Pin68
GPIO39Pin69
GPIO40Pin74
GPIO41Pin75
GPIO44Pin25
GPIO47Pin79
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Pin number
Pin6
Pin7
Pin8
Pin9
Pin10
Pin12
Pin13
Pin14
Pin15
Pin16
Pin19
Pin20
Pin21
Pin22
Pin23
Pin29
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Pin number
Pin6
Pin7
Pin8
Pin9
Pin10
Pin12
Pin13
Pin14
Pin15
Pin16
Pin19
Pin20
Pin21
Pin22
Pin23
Pin29
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Pin number
Pin6
Pin7
Pin8
Pin9
Pin14
Pin15
Pin16
Pin27
Pin28
Pin29
Pin30
Pin31
Pin34
Pin35
Pin37
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin number
GPIO1Pin12
GPIO2Pin13
GPIO3Pin41
GPIO4Pin42
GPIO5Pin21
GPIO6Pin22
GPIO7Pin23
GPIO8Pin24
GPIO9Pin26
GPIO10Pin43
GPIO11Pin44
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin number
GPIO1Pin12
GPIO2Pin13
GPIO3Pin41
GPIO4Pin42
GPIO5Pin21
GPIO6Pin22
GPIO7Pin23
GPIO8Pin24
GPIO9Pin26
GPIO10Pin43
GPIO11Pin44
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPIO numberPin number
GPIO1Pin4
GPIO2Pin5
GPIO3Pin6
GPIO4Pin7
GPIO5Pin18
GPIO6 Pin19
GPIO7Pin1Pin1
GPIO8Pin38
GPIO9Pin25
GPIO10Pin26
GPIO11Pin27
GPIO12Pin28
GPIO13Pin40
GPIO14Pin41
GPIO15Pin64
GPIO16Pin20
GPIO17Pin21
GPIO18Pin34
GPIO19Pin35
GPIO20Pin30
GPIO21Pin22
GPIO22Pin36
GPIO23Pin37
GPIO24Pin16
GPIO25Pin39
GPIO26Pin23
GPIO27Pin78
GPIO28Pin83
GPIO29Pin107
GPIO30Pin92
GPIO31Pin95
GPIO32Pin97
GPIO33Pin98
GPIO34Pin104
GPIO35Pin105
GPIO36Pin106
GPIO37Pin103
GPIO38Pin96
GPIO39Pin114
GPIO40Pin115
GPIO41Pin116
+ + +## Methods + +### `Pin.read` + +```python +Pin.read() +``` + +This method reads the pin level. + +**Return Value:** + +Pin level. `0` - low level. `1` - high level. + +### `Pin.write` + +``` +Pin.write(value) +``` + +This method sets the pin level. + +> Note: You need to ensure that the pin is in the output mode before you set the pin level. + +**Parameter:** + +- `value` - Integer type. Pin level. `0` - low level. `1` - high level. + +**Return Value:** + +`0` - Successful execution + +`-1` - Failed execution + +**Example:** + +```python +>>> from machine import Pin +>>> gpio1 = Pin(Pin.GPIO1, Pin.OUT, Pin.PULL_DISABLE, 0) +>>> gpio1.write(1) +0 +>>> gpio1.read() +1 +``` + +### `Pin.set_dir` + +```python +Pin.set_dir(value) +``` + +This method sets I/O mode of the pin. + +**Parameter:** + +- `value` - Integer type. I/O mode of the pin. `0` - Input mode. `1` - Output mode. + +**Return Value:** + +`0` - Successful execution + +`-1` - Failed execution + +### `Pin.get_dir` + +```python +Pin.get_dir() +``` + +This method gets I/O mode of the pin. + +**Return Value:** + +I/O mode of pins. + +`0` - Input mode. + +`1` - Output mode. + +**Example:** + +```python +>>> from machine import Pin +>>> gpio1 = Pin(Pin.GPIO1, Pin.OUT, Pin.PULL_DISABLE, 0) +>>> gpio1.get_dir() +1 +>>> gpio1.set_dir(Pin.IN) +0 +>>> gpio1.get_dir() +0 +``` + +## Constants +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstantDescription
Pin.GPIO1GPIO1
Pin.GPIO2GPIO2
Pin.GPIO3GPIO3
Pin.GPIO4GPIO4
Pin.GPIO5GPIO5
Pin.GPIO6GPIO6
Pin.GPIO7GPIO7
Pin.GPIO8GPIO8
Pin.GPIO9GPIO9
Pin.GPIO10GPIO10
Pin.GPIO11GPIO11
Pin.GPIO12GPIO12
Pin.GPIO13GPIO13
Pin.GPIO14GPIO14
Pin.GPIO15GPIO15
Pin.GPIO16GPIO16
Pin.GPIO17GPIO17
Pin.GPIO18GPIO18
Pin.GPIO19GPIO19
Pin.GPIO20GPIO20
Pin.GPIO21GPIO21
Pin.GPIO22GPIO22
Pin.GPIO23GPIO23
Pin.GPIO24GPIO24
Pin.GPIO25GPIO25
Pin.GPIO26GPIO26
Pin.GPIO27GPIO27
Pin.GPIO28GPIO28
Pin.GPIO29GPIO29
Pin.GPIO30GPIO30
Pin.GPIO31GPIO31
Pin.GPIO32GPIO32
Pin.GPIO33GPIO33
Pin.GPIO34GPIO34
Pin.GPIO35GPIO35
Pin.GPIO36GPIO36
Pin.GPIO37GPIO37
Pin.GPIO38GPIO38
Pin.GPIO39GPIO39
Pin.GPIO40GPIO40
Pin.GPIO41GPIO41
Pin.INInput mode
Pin.OUTOutput mode
Pin.PULL_DISABLEFloating mode
Pin.PULL_PUPull-up mode
Pin.PULL_PDPull-down mode
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + +
ConstantDescription
Pin.GPIO1GPIO1
Pin.GPIO2GPIO2
Pin.GPIO3GPIO3
Pin.GPIO4GPIO4
Pin.GPIO5GPIO5
Pin.GPIO6GPIO6
Pin.GPIO7GPIO7
Pin.GPIO8 GPIO8Pin38
Pin.GPIO9 GPIO9Pin25
Pin.GPIO10 GPIO10Pin26
Pin.GPIO11 GPIO11Pin27
Pin.GPIO12 GPIO12Pin28
Pin.GPIO13 GPIO13Pin40
Pin.GPIO14 GPIO14Pin41
Pin.GPIO15 GPIO15Pin64
Pin.GPIO16 GPIO16Pin20
Pin.GPIO17 GPIO17Pin21
Pin.GPIO18 GPIO18Pin34
Pin.GPIO19 GPIO19Pin35
Pin.GPIO20 GPIO20Pin30
Pin.GPIO21 GPIO21Pin22
Pin.GPIO22 GPIO22Pin36
Pin.GPIO23 GPIO23Pin37
Pin.GPIO24 GPIO24Pin16
Pin.GPIO25 GPIO25Pin39
Pin.GPIO26 GPIO26Pin23
Pin.GPIO27 GPIO27Pin78
Pin.GPIO28 GPIO28Pin83
Pin.GPIO29 GPIO29Pin107
Pin.GPIO30 GPIO30Pin92
Pin.GPIO31 GPIO31Pin95
Pin.GPIO32 GPIO32Pin97
Pin.GPIO33 GPIO33Pin98
Pin.GPIO34 GPIO34Pin104
Pin.GPIO35 GPIO35Pin105
Pin.GPIO36 GPIO36Pin106
Pin.GPIO37 GPIO37Pin103
Pin.GPIO38 GPIO38Pin96
Pin.GPIO39 GPIO39Pin114
Pin.GPIO40 GPIO40Pin115
Pin.GPIO41 GPIO41Pin116
Pin.INInput mode
Pin.OUTOutput mode
Pin.PULL_DISABLEFloating mode
Pin.PULL_PUPull-up mode
Pin.PULL_PDPull-down mode
-## Methods - -### `Pin.read` - -```python -Pin.read() -``` - -This method reads the pin level. - -**Return Value:** - -Pin level. `0` - low level. `1` - high level. - -### `Pin.write` - -``` -Pin.write(value) -``` - -This method sets the pin level. - -> Note: You need to ensure that the pin is in the output mode before you set the pin level. - -**Parameter:** - -- `value` - Integer type. Pin level. `0` - low level. `1` - high level. - -**Return Value:** - -`0` - Successful execution - -`-1` - Failed execution - -**Example:** - -```python ->>> from machine import Pin ->>> gpio1 = Pin(Pin.GPIO1, Pin.OUT, Pin.PULL_DISABLE, 0) ->>> gpio1.write(1) -0 ->>> gpio1.read() -1 -``` - -### `Pin.set_dir` - -```python -Pin.set_dir(value) -``` - -This method sets I/O mode of the pin. - -**Parameter:** - -- `value` - Integer type. I/O mode of the pin. `0` - Input mode. `1` - Output mode. - -**Return Value:** - -`0` - Successful execution - -`-1` - Failed execution - -### `Pin.get_dir` - -```python -Pin.get_dir() -``` - -This method gets I/O mode of the pin. - -**Return Value:** - -I/O mode of pins. - -`0` - Input mode. - -`1` - Output mode. - -**Example:** - -```python ->>> from machine import Pin ->>> gpio1 = Pin(Pin.GPIO1, Pin.OUT, Pin.PULL_DISABLE, 0) ->>> gpio1.get_dir() -1 ->>> gpio1.set_dir(Pin.IN) -0 ->>> gpio1.get_dir() -0 -``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstantDescription
Pin.GPIO1GPIO1
Pin.GPIO2GPIO2
Pin.GPIO3GPIO3
Pin.GPIO4GPIO4
Pin.GPIO5GPIO5
Pin.GPIO6GPIO6
Pin.GPIO7GPIO7
Pin.GPIO8GPIO8
Pin.GPIO9GPIO9
Pin.GPIO10GPIO10
Pin.GPIO11GPIO11
Pin.GPIO12GPIO12
Pin.GPIO13GPIO13
Pin.GPIO14GPIO14
Pin.GPIO15GPIO15
Pin.GPIO16GPIO16
Pin.GPIO17GPIO17
Pin.GPIO18GPIO18
Pin.GPIO19GPIO19
Pin.INInput mode
Pin.OUTOutput mode
Pin.PULL_DISABLEFloating mode
Pin.PULL_PUPull-up mode
Pin.PULL_PDPull-down mode
-## Constants -
- +
@@ -2781,7 +4556,31 @@ I/O mode of pins. + + + + + + + + + + + + + + + + + + + + + + + + @@ -2800,11 +4599,11 @@ I/O mode of pins. - +>
ConstantPin.GPIO41 GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.GPIO45GPIO45
Pin.GPIO46GPIO46
Pin.GPIO47GPIO47
Pin.IN Input mode
Pin.PULL_PD Pull-down mode
- +
@@ -2973,10 +4772,169 @@ I/O mode of pins. - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstantGPIO40
Pin.GPIO41GPIO41Pin.GPIO41GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.GPIO45GPIO45
Pin.GPIO46GPIO46
Pin.GPIO47GPIO47
Pin.INInput mode
Pin.OUTOutput mode
Pin.PULL_DISABLEFloating mode
Pin.PULL_PUPull-up mode
Pin.PULL_PDPull-down mode
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2999,7 +4957,7 @@ I/O mode of pins.
ConstantDescription
Pin.GPIO1GPIO1
Pin.GPIO2GPIO2
Pin.GPIO3GPIO3
Pin.GPIO4GPIO4
Pin.GPIO5GPIO5
Pin.GPIO6GPIO6
Pin.GPIO7GPIO7
Pin.GPIO9GPIO9
Pin.GPIO10GPIO10
Pin.GPIO11GPIO11
Pin.GPIO12GPIO12
Pin.GPIO13GPIO13
Pin.GPIO18GPIO18
Pin.GPIO19GPIO19
Pin.GPIO20GPIO20
Pin.GPIO22GPIO22
Pin.GPIO28GPIO28
Pin.GPIO29GPIO29
Pin.GPIO30GPIO30
Pin.GPIO35GPIO35
Pin.GPIO36GPIO36
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.GPIO45GPIO45
Pin.GPIO46GPIO46
Pin.GPIO47GPIO47
Pin.IN Input mode
- +
@@ -3080,9 +5038,6 @@ I/O mode of pins. - - - @@ -3105,7 +5060,7 @@ I/O mode of pins.
ConstantGPIO18
Pin.GPIO19GPIO19
Pin.IN Input mode
- +
@@ -3262,45 +5217,6 @@ I/O mode of pins. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3319,11 +5235,11 @@ I/O mode of pins. -> +
ConstantGPIO37
Pin.GPIO38GPIO38
Pin.GPIO39GPIO39
Pin.GPIO40GPIO40
Pin.GPIO41GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.GPIO45GPIO45
Pin.GPIO46GPIO46
Pin.GPIO47GPIO47
Pin.IN Input mode
Pin.PULL_PD Pull-down mode
- +
@@ -3416,109 +5332,121 @@ I/O mode of pins. - - + + - - + + - - + + - - + + - - + + + +
ConstantGPIO21
Pin.GPIO22GPIO22Pin.INInput mode
Pin.GPIO23GPIO23Pin.OUTOutput mode
Pin.GPIO24GPIO24Pin.PULL_DISABLEFloating mode
Pin.GPIO25GPIO25Pin.PULL_PUPull-up mode
Pin.GPIO26GPIO26Pin.PULL_PDPull-down mode
+ + + - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + @@ -3541,7 +5469,7 @@ I/O mode of pins.
Pin.GPIO27GPIO27ConstantDescription
Pin.GPIO28GPIO28Pin.GPIO1GPIO1
Pin.GPIO29GPIO29Pin.GPIO2GPIO2
Pin.GPIO30GPIO30Pin.GPIO3GPIO3
Pin.GPIO31GPIO31Pin.GPIO4GPIO4
Pin.GPIO32GPIO32Pin.GPIO5GPIO5
Pin.GPIO33GPIO33Pin.GPIO6GPIO6
Pin.GPIO34GPIO34Pin.GPIO7GPIO7
Pin.GPIO35GPIO35Pin.GPIO8GPIO8
Pin.GPIO36GPIO36Pin.GPIO9GPIO9
Pin.GPIO37GPIO37Pin.GPIO10GPIO10
Pin.GPIO38GPIO38Pin.GPIO11GPIO11
Pin.GPIO39GPIO39Pin.GPIO12GPIO12
Pin.GPIO40GPIO40Pin.GPIO13GPIO13
Pin.GPIO41GPIO41Pin.GPIO14GPIO14
Pin.GPIO42GPIO42Pin.GPIO15GPIO15
Pin.GPIO43GPIO43Pin.GPIO16GPIO16
Pin.GPIO44GPIO44Pin.GPIO17GPIO17
Pin.GPIO45GPIO45Pin.GPIO18GPIO18
Pin.GPIO46GPIO46Pin.GPIO19GPIO19
Pin.GPIO47GPIO47Pin.GPIO20GPIO20
Pin.GPIO21GPIO21
Pin.IN Input mode
- +
@@ -3577,6 +5505,10 @@ I/O mode of pins. + + + + @@ -3597,6 +5529,22 @@ I/O mode of pins. + + + + + + + + + + + + + + + + @@ -3606,32 +5554,96 @@ I/O mode of pins. - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -3646,13 +5658,6 @@ I/O mode of pins. - - - - - - - @@ -3675,7 +5680,7 @@ I/O mode of pins.
ConstantPin.GPIO7 GPIO7
Pin.GPIO8GPIO8
Pin.GPIO9 GPIO9Pin.GPIO13 GPIO13
Pin.GPIO14GPIO14
Pin.GPIO15GPIO15
Pin.GPIO16GPIO16
Pin.GPIO17GPIO17
Pin.GPIO18 GPIO18GPIO19
Pin.GPIO20GPIO20Pin.GPIO20GPIO20
Pin.GPIO21GPIO21
Pin.GPIO22GPIO22
Pin.GPIO23GPIO23
Pin.GPIO24GPIO24
Pin.GPIO25GPIO25
Pin.GPIO26GPIO26
Pin.GPIO27GPIO27
Pin.GPIO28GPIO28
Pin.GPIO29GPIO29
Pin.GPIO30GPIO30
Pin.GPIO31GPIO31
Pin.GPIO32GPIO32
Pin.GPIO33GPIO33
Pin.GPIO34GPIO34
Pin.GPIO35GPIO35
Pin.GPIO36GPIO36
Pin.GPIO22GPIO22Pin.GPIO37GPIO37
Pin.GPIO28GPIO28Pin.GPIO38GPIO38
Pin.GPIO29GPIO29Pin.GPIO39GPIO39
Pin.GPIO30GPIO30Pin.GPIO40GPIO40
Pin.GPIO35GPIO35Pin.GPIO41GPIO41
Pin.GPIO36GPIO36Pin.GPIO42GPIO42
Pin.GPIO43GPIO45
Pin.GPIO46GPIO46
Pin.GPIO47GPIO47
Pin.IN Input mode
- +
@@ -3755,6 +5760,99 @@ I/O mode of pins. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3777,7 +5875,7 @@ I/O mode of pins.
ConstantPin.GPIO18 GPIO18
Pin.GPIO19GPIO19
Pin.GPIO20GPIO20
Pin.GPIO21GPIO21
Pin.GPIO22GPIO22
Pin.GPIO23GPIO23
Pin.GPIO24GPIO24
Pin.GPIO25GPIO25
Pin.GPIO26GPIO26
Pin.GPIO27GPIO27
Pin.GPIO28GPIO28
Pin.GPIO29GPIO29
Pin.GPIO30GPIO30
Pin.GPIO31GPIO31
Pin.GPIO32GPIO32
Pin.GPIO33GPIO33
Pin.GPIO34GPIO34
Pin.GPIO35GPIO35
Pin.GPIO36GPIO36
Pin.GPIO37GPIO37
Pin.GPIO38GPIO38
Pin.GPIO39GPIO39
Pin.GPIO40GPIO40
Pin.GPIO41GPIO41
Pin.IN Input mode
- +
@@ -3933,6 +6031,35 @@ I/O mode of pins. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3955,7 +6082,7 @@ I/O mode of pins.
ConstantPin.GPIO37 GPIO37
Pin.GPIO38GPIO38
Pin.GPIO39GPIO39
Pin.GPIO40GPIO40
Pin.GPIO41GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.IN Input mode
- +
@@ -3980,73 +6107,166 @@ I/O mode of pins. - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + @@ -4069,7 +6289,7 @@ I/O mode of pins.
ConstantGPIO4
Pin.GPIO5GPIO5Pin.GPIO5GPIO5
Pin.GPIO6GPIO6
Pin.GPIO7GPIO7
Pin.GPIO8GPIO8
Pin.GPIO9GPIO9
Pin.GPIO10GPIO10
Pin.GPIO11GPIO11
Pin.GPIO12GPIO12
Pin.GPIO13GPIO13
Pin.GPIO14GPIO14
Pin.GPIO15GPIO15
Pin.GPIO16GPIO16
Pin.GPIO17GPIO17
Pin.GPIO18GPIO18
Pin.GPIO19GPIO19
Pin.GPIO20GPIO20
Pin.GPIO21GPIO21
Pin.GPIO22GPIO22
Pin.GPIO23GPIO23
Pin.GPIO24GPIO24
Pin.GPIO25GPIO25
Pin.GPIO26GPIO26
Pin.GPIO27GPIO27
Pin.GPIO28GPIO28
Pin.GPIO6GPIO6Pin.GPIO29GPIO29
Pin.GPIO7GPIO7Pin.GPIO30GPIO30
Pin.GPIO8GPIO8Pin.GPIO31GPIO31
Pin.GPIO9GPIO9Pin.GPIO32GPIO32
Pin.GPIO10GPIO10Pin.GPIO33GPIO33
Pin.GPIO11GPIO11Pin.GPIO34GPIO34
Pin.GPIO12GPIO12Pin.GPIO35GPIO35
Pin.GPIO13GPIO13Pin.GPIO36GPIO36
Pin.GPIO14GPIO14Pin.GPIO37GPIO37
Pin.GPIO15GPIO15Pin.GPIO38GPIO38
Pin.GPIO16GPIO16Pin.GPIO39GPIO39
Pin.GPIO17GPIO17Pin.GPIO40GPIO40
Pin.GPIO18GPIO18Pin.GPIO41GPIO41
Pin.GPIO19GPIO19Pin.GPIO42GPIO42
Pin.GPIO20GPIO20Pin.GPIO43GPIO43
Pin.GPIO21GPIO21Pin.GPIO44GPIO44
Pin.IN Input mode
- +
@@ -4236,26 +6456,6 @@ I/O mode of pins. - - - - - - - - - - - - - - - - - - - - @@ -4278,8 +6478,7 @@ I/O mode of pins.
Constant
Pin.GPIO40 GPIO40
Pin.GPIO41GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.GPIO45GPIO45
Pin.IN Input mode
- - +
@@ -4359,19 +6558,6 @@ I/O mode of pins. - - - - - - - - - - - - - @@ -4391,22 +6577,6 @@ I/O mode of pins. - - - - - - - - - - - - - - - - @@ -4423,14 +6593,6 @@ I/O mode of pins. - - - - - - - - @@ -4451,6 +6613,7 @@ I/O mode of pins. + @@ -4472,8 +6635,7 @@ I/O mode of pins.
ConstantPin.GPIO18 GPIO18
Pin.GPIO19GPIO19
Pin.GPIO20GPIO20
Pin.GPIO21GPIO21
Pin.GPIO22 GPIO22
Pin.GPIO26 GPIO26
Pin.GPIO27GPIO27
Pin.GPIO28GPIO28
Pin.GPIO29GPIO29
Pin.GPIO30GPIO30
Pin.GPIO31 GPIO31Pin.GPIO34 GPIO34
Pin.GPIO35GPIO35
Pin.GPIO36GPIO36
Pin.GPIO37 GPIO37Pin.GPIO41 GPIO41
Pin.IN Input mode
- - +
@@ -4549,34 +6711,6 @@ I/O mode of pins. - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4646,17 +6780,6 @@ I/O mode of pins. - - - - - - - - - - - @@ -4678,8 +6801,7 @@ I/O mode of pins.
ConstantPin.GPIO17 GPIO17
Pin.GPIO18GPIO18
Pin.GPIO19GPIO19
Pin.GPIO20GPIO20
Pin.GPIO21GPIO21
Pin.GPIO22GPIO22
Pin.GPIO23GPIO23
Pin.GPIO24GPIO24
Pin.GPIO25 GPIO25GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.IN Input mode
- - +
@@ -4847,6 +6969,31 @@ I/O mode of pins. + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4869,7 +7016,7 @@ I/O mode of pins.
ConstantPin.GPIO40 GPIO40
Pin.GPIO41GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.GPIO45GPIO45
Pin.GPIO46GPIO46
Pin.IN Input mode
- +
@@ -4909,6 +7056,10 @@ I/O mode of pins. + + + + @@ -4998,33 +7149,82 @@ I/O mode of pins. - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - - @@ -5047,7 +7247,7 @@ I/O mode of pins.
ConstantPin.GPIO8 GPIO8
Pin.GPIO9GPIO9
Pin.GPIO10 GPIO10GPIO31
Pin.GPIO32GPIO32Pin.GPIO32GPIO32
Pin.GPIO33GPIO33
Pin.GPIO34GPIO34
Pin.GPIO35GPIO35
Pin.GPIO36GPIO36
Pin.GPIO37GPIO37
Pin.GPIO38GPIO38
Pin.GPIO39GPIO39
Pin.GPIO40GPIO40
Pin.GPIO41GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.GPIO45GPIO45
Pin.GPIO34GPIO34Pin.GPIO46GPIO46
Pin.GPIO35GPIO35Pin.GPIO47GPIO47
Pin.GPIO36GPIO36Pin.GPIO48GPIO48
Pin.GPIO38GPIO38Pin.GPIO49GPIO49
Pin.GPIO39GPIO39Pin.GPIO50GPIO50
Pin.GPIO40GPIO40
Pin.IN Input mode
- +
@@ -5087,10 +7287,6 @@ I/O mode of pins. - - - - @@ -5183,10 +7379,6 @@ I/O mode of pins. - - - - @@ -5199,10 +7391,6 @@ I/O mode of pins. - - - - @@ -5216,21 +7404,6 @@ I/O mode of pins. - - - - - - - - - - - - - - - @@ -5253,7 +7426,7 @@ I/O mode of pins.
ConstantPin.GPIO8 GPIO8
Pin.GPIO9GPIO9
Pin.GPIO10 GPIO10Pin.GPIO32 GPIO32
Pin.GPIO33GPIO33
Pin.GPIO34 GPIO34Pin.GPIO36 GPIO36
Pin.GPIO37GPIO37
Pin.GPIO38 GPIO38GPIO40
Pin.GPIO41GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.IN Input mode
- +
@@ -5418,9 +7591,6 @@ I/O mode of pins. - - - @@ -5443,7 +7613,7 @@ I/O mode of pins.
ConstantGPIO39
Pin.GPIO40GPIO40
Pin.IN Input mode
- +
@@ -5483,6 +7653,10 @@ I/O mode of pins. + + + + @@ -5575,6 +7749,10 @@ I/O mode of pins. + + + + @@ -5587,6 +7765,10 @@ I/O mode of pins. + + + + @@ -5599,6 +7781,31 @@ I/O mode of pins. + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5673,6 +7880,7 @@ I/O mode of pins. + @@ -5769,3 +7977,167 @@ I/O mode of pins.
ConstantPin.GPIO8 GPIO8
Pin.GPIO9GPIO9
Pin.GPIO10 GPIO10Pin.GPIO32 GPIO32
Pin.GPIO33GPIO33
Pin.GPIO34 GPIO34Pin.GPIO36 GPIO36
Pin.GPIO37GPIO37
Pin.GPIO38 GPIO38Pin.GPIO40 GPIO40
Pin.GPIO41GPIO41
Pin.GPIO42GPIO42
Pin.GPIO43GPIO43
Pin.GPIO44GPIO44
Pin.GPIO45GPIO45
Pin.GPIO46GPIO46
Pin.IN Input mode
Pin.GPIO11 GPIO11
Pin.IN Input mode
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstantDescription
Pin.GPIO1GPIO1
Pin.GPIO2GPIO2
Pin.GPIO3GPIO3
Pin.GPIO4GPIO4
Pin.GPIO5GPIO5
Pin.GPIO6GPIO6
Pin.GPIO7GPIO7
Pin.GPIO8GPIO8
Pin.GPIO9GPIO9
Pin.GPIO10GPIO10
Pin.GPIO12GPIO12
Pin.GPIO13GPIO13
Pin.GPIO14GPIO14
Pin.GPIO17GPIO17
Pin.GPIO23GPIO23
Pin.GPIO24GPIO24
Pin.GPIO25GPIO25
Pin.GPIO26GPIO26
Pin.GPIO27GPIO27
Pin.GPIO28GPIO28
Pin.GPIO29GPIO29
Pin.GPIO30GPIO30
Pin.GPIO31GPIO31
Pin.GPIO32GPIO32
Pin.GPIO33GPIO33
Pin.GPIO34GPIO34
Pin.GPIO35GPIO35
Pin.GPIO36GPIO36
Pin.GPIO37GPIO37
Pin.GPIO38GPIO38
Pin.GPIO39GPIO39
Pin.GPIO40GPIO40
Pin.GPIO41GPIO41
Pin.INInput mode
Pin.OUTOutput mode
Pin.PULL_DISABLEFloating mode
Pin.PULL_PUPull-up mode
Pin.PULL_PDPull-down mode
+
diff --git a/zh/peripherals/machine.Pin.md b/zh/peripherals/machine.Pin.md index 1ed209d3ef7a50f389f14c39ddd56ee2b94e2af2..2e2d51592737d55b6b589698541632ce588795ee 100644 --- a/zh/peripherals/machine.Pin.md +++ b/zh/peripherals/machine.Pin.md @@ -46,6 +46,7 @@ gpio1.get_dir()
+ **示例:** @@ -2211,6 +2212,10 @@ gpio1.get_dir() GPIO16 引脚号81(I&PU)(EC800ECN_LE&LQ&CG不可用,不可与62脚同时使用) + + GPIO17 + 引脚号25(I&PD) + GPIO25 引脚号17(I&PU)(不可与GPIO4同时为gpio) @@ -3315,7 +3320,7 @@ gpio1.get_dir() GPIO39 - 引脚号16 + 引脚号69 GPIO40 @@ -3731,7 +3736,7 @@ gpio1.get_dir() - + ## 方法