From b23dbf917640c84cf098bbc3f3d4466fd6166584 Mon Sep 17 00:00:00 2001 From: Gitshaoxiang <1026025056@qq.com> Date: Thu, 3 Dec 2020 12:00:42 +0800 Subject: [PATCH] add some note for coreink api --- docs/en/accessory/cable/24awg_cable.md | 2 +- docs/en/api/coreink/eink_api.md | 17 ++++++++++-- docs/en/atom/atomhub_switch.md | 27 ++++++++++++++++++- docs/en/atom/atomhub_switch_d.md | 4 ++- docs/en/core/coreink.md | 2 +- .../timer_cam/quick_start_cameratool.md | 2 +- docs/zh_CN/api/coreink/eink_api.md | 17 ++++++++++-- docs/zh_CN/core/coreink.md | 2 +- .../timer_cam/quick_start_cameratool.md | 2 +- 9 files changed, 64 insertions(+), 11 deletions(-) diff --git a/docs/en/accessory/cable/24awg_cable.md b/docs/en/accessory/cable/24awg_cable.md index 2a77a43e..a673423b 100644 --- a/docs/en/accessory/cable/24awg_cable.md +++ b/docs/en/accessory/cable/24awg_cable.md @@ -4,7 +4,7 @@ ## Description -**24AWG 4-CORE Shielded Cable** A twisted pair shielded cable of M5Stack, often used for data communication line construction. The aluminum foil and woven layer wrapped inside can effectively reduce signal interference and enhance the stability of communication lines. It is suitable for ordinary serial communication, and standard communication bus construction such as RS485, RS232, CAN, etc. +**24AWG 4-CORE Shielded Cable** is a STP(shielded twisted pair) cable that is commonly used for data communications. The aluminium foil and woven layer wrapping inside can effectively reduce signal interference and enhance the stability of communication lines. It is suitable for ordinary serial communication, and standard communication bus construction such as RS485, RS232, CAN, etc. ## Product Features diff --git a/docs/en/api/coreink/eink_api.md b/docs/en/api/coreink/eink_api.md index 28c6f825..92f9d188 100644 --- a/docs/en/api/coreink/eink_api.md +++ b/docs/en/api/coreink/eink_api.md @@ -1,10 +1,23 @@ # E-Ink -?>Before using the E-Ink screen manipulation function, you need to create an instance and pass in the screen driver address. +?>Before using the E-Ink screen operation function, you need to create an instance and pass in the screen driver address. Call `M5.M5Ink.isInit()` and initialize with `M5.M5Ink.clear();`. ``` #include "M5CoreInk.h" + Ink_Sprite InkPageSprite(&M5.M5Ink); + +void setup() +{ + M5.begin(); + digitalWrite(LED_EXT_PIN,LOW); + if( !M5.M5Ink.isInit()) + { + Serial.printf("Ink Init faild"); + while (1) delay(100); + } + M5.M5Ink.clear(); +} ``` ## creatSprite @@ -64,7 +77,7 @@ InkPageSprite.clear(); ```arduino -InkPageSprite.clear(); +InkPageSprite.deleteSprite(); ``` diff --git a/docs/en/atom/atomhub_switch.md b/docs/en/atom/atomhub_switch.md index a0d271ad..e750b8d0 100644 --- a/docs/en/atom/atomhub_switch.md +++ b/docs/en/atom/atomhub_switch.md @@ -1,6 +1,6 @@ # ATOM SWITCH Kit -SKU:K042 +SKU:K042-D
@@ -36,6 +36,31 @@ - Intelligent switch +## Switch & Switch-D + + + + + + + + + + + + + + + + + + + + + + +
/SwitchSwitch-D
Relay currentAC 250V/10AAC 250V/5A
Power input interfaceHT3.96R 2PHT3.96R 3P
Relay interface(NO,NC,COM) x2(NO(Directly connected to AC power), COM) x2
+ ## Specification diff --git a/docs/en/atom/atomhub_switch_d.md b/docs/en/atom/atomhub_switch_d.md index 42d5f94e..bdc1a239 100644 --- a/docs/en/atom/atomhub_switch_d.md +++ b/docs/en/atom/atomhub_switch_d.md @@ -6,7 +6,9 @@ ## Description -**ATOM SWITCH** is a bi-directional control programable switch for the M5ATOM. It can be connected to bi-directional AC circuits for simultaneous on-off control. The on-board relay can support up to 250V / 10A AC(Instantaneous current 16A). Built in step-down module can provide 5V / 1A DC power supply for ATOM. In order to ensure safe use, its DC circuit has overheating and short circuit protection functions. In order to facilitate the use of users in industrial scenarios, an SP485EE level-conversion IC is built in. There are also a set of RS485 interfaces provided for the user to connect RS485 equipment.RS485 has the ability to supply power to ATOM, the support voltage is 9-24V. In addition, a set of HY2.0 interfaces is also provided for connecting I2C peripheral equipment or general I/O equipment. With the Bluetooth and WiFi functions of M5ATOM, you can easily setup a remote control switch. If you have multiple M5ATOM HUB SWITCH modules, you can set them up in parallel through the RS485 interface. +**Atom Hub Switch D** is a dual relay expansion kit. The D in the name stands for “Direct” since the power supply is directly connected to the relays. The AC/DC power supply flows to the NO(Normally Open) contacts of the two relays and can be controlled via the M5Atom. When in use, the user only needs to connect the electrical load to the relay, and there is no need to connect the power line separately. Compared with the previous relay control scheme, this module will be more concise and efficient in controlling the electric load. In addition to the power supply for the relay, the input power supply will also provide 5V/1A DC power supply for the ATOM through the built-in step-down module. In order to ensure the safety of use, the power input circuit has overheating and short-circuit protection, when the current is too high or a short circuit occurs It can effectively disconnect the circuit to prevent damage to the components. A built-in SP485EE level conversion chip, provides an RS485 communication interface to support multi-device communication. It also integrates a 9-24V step-down 5V circuit to adapt to the power demand in industrial scenarios, and expand power supply capabilities. + +A pair of HY2.0-4P ports are included to connect to I2C peripherals or general I/O devices. Combined with ATOM's built-in Bluetooth and WIFI functions, ATOM HUB SWITCH D can quickly build remote device switch applications. ## Product Features diff --git a/docs/en/core/coreink.md b/docs/en/core/coreink.md index 5c1191b0..a212239b 100644 --- a/docs/en/core/coreink.md +++ b/docs/en/core/coreink.md @@ -244,7 +244,7 @@ For more info on specific pin functions refer to the official ESP32 Docs[ESP32 d - **API** - - [Arduino API](en/arduino/arduino_home_page) + - [Arduino API](en/arduino/arduino_home_page?id=coreink_api) ## Example diff --git a/docs/en/quick_start/timer_cam/quick_start_cameratool.md b/docs/en/quick_start/timer_cam/quick_start_cameratool.md index 33c2bac4..4ced1c08 100644 --- a/docs/en/quick_start/timer_cam/quick_start_cameratool.md +++ b/docs/en/quick_start/timer_cam/quick_start_cameratool.md @@ -11,7 +11,7 @@

- + Windows10 diff --git a/docs/zh_CN/api/coreink/eink_api.md b/docs/zh_CN/api/coreink/eink_api.md index b312a9df..64fe2561 100644 --- a/docs/zh_CN/api/coreink/eink_api.md +++ b/docs/zh_CN/api/coreink/eink_api.md @@ -1,10 +1,23 @@ # E-Ink -?>使用E-Ink屏幕操作函数前,需要创建实例并传入屏幕驱动地址. +?>使用E-Ink屏幕操作函数前,需要创建实例并传入屏幕驱动地址.调用`M5.M5Ink.isInit()`,与`M5.M5Ink.clear();`进行初始化。 ``` #include "M5CoreInk.h" + Ink_Sprite InkPageSprite(&M5.M5Ink); + +void setup() +{ + M5.begin(); + digitalWrite(LED_EXT_PIN,LOW); + if( !M5.M5Ink.isInit()) + { + Serial.printf("Ink Init faild"); + while (1) delay(100); + } + M5.M5Ink.clear(); +} ``` ## creatSprite @@ -65,7 +78,7 @@ InkPageSprite.clear(); ```arduino -InkPageSprite.clear(); +InkPageSprite.deleteSprite(); ``` diff --git a/docs/zh_CN/core/coreink.md b/docs/zh_CN/core/coreink.md index 8ae541ce..80618b82 100644 --- a/docs/zh_CN/core/coreink.md +++ b/docs/zh_CN/core/coreink.md @@ -243,7 +243,7 @@ - **API** - - [Arduino API](zh_CN/arduino/arduino_home_page) + - [Arduino API](zh_CN/arduino/arduino_home_page?id=coreink_api) ### Arduino IDE diff --git a/docs/zh_CN/quick_start/timer_cam/quick_start_cameratool.md b/docs/zh_CN/quick_start/timer_cam/quick_start_cameratool.md index f0ac5d44..d2d7cf7f 100644 --- a/docs/zh_CN/quick_start/timer_cam/quick_start_cameratool.md +++ b/docs/zh_CN/quick_start/timer_cam/quick_start_cameratool.md @@ -10,7 +10,7 @@

- + Windows10