diff --git a/docs/en/unit/4relay.md b/docs/en/unit/4relay.md index cebe2027..cf8577ce 100644 --- a/docs/en/unit/4relay.md +++ b/docs/en/unit/4relay.md @@ -6,7 +6,7 @@ ## Description -**4-Relay** is a unit integrated with 4-way relay, which is controlled by I2C. The maximum control voltage of relay is AC-250V, rated current is 10A, and instantaneous current can bear 16A. Each relay can be controlled independently. Each relay has a programmable status indicator. +**4-Relay** unit is an integrated 4-way relay module which can be controlled by I2C protocol. The maximum control voltage of each relay is AC-250V, the rated current is 10A and the instantaneous current can hold up to 16A. Each relay can be controlled independently, each on it's own. Each relay has status (LED) indictor as well to show the state of the relay at any given time. ## Product Features @@ -27,7 +27,7 @@ - Programmable power switch ## Specification - + @@ -69,7 +69,7 @@ ## EasyLoader ->EasyLoader is a concise and fast program writer, which has a built-in case program related to the product. It can be burned to the main control by simple steps to perform a series of function verification. Please install the corresponding driver according to the device type. M5Core host [Please click here to view the CP210X driver installation tutorial](en/arduino/arduino_development), M5StickC/V/T/ATOM series can be used without driver) +>EasyLoader is a precise and fast program writer which has a built-in functionalities related to the 4-Relay unit. The Easyloader program can burn the firmware to the main controller board by simple easy to follow steps. Please install the corresponding driver according to the device type. [Please click here to view the CP210X driver installation tutorial](en/arduino/arduino_development), M5StickC/V/T/ATOM series can be used without driver)
@@ -116,4 +116,4 @@ anchor_search(purchase_link); scrollFunc(); - \ No newline at end of file + diff --git a/docs/en/unit/pbhub.md b/docs/en/unit/pbhub.md index 03f6bbba..1f695968 100644 --- a/docs/en/unit/pbhub.md +++ b/docs/en/unit/pbhub.md @@ -6,15 +6,20 @@ ## Description -**PbHUB**, is a expander for singel-bus GROVE PORTB(Black port on M5GO Base). 1-to-6. PortB can be used as GPIO and analog in two data lines connected to GPIO36 and GPIO26 on ESP32. Same as PaHUB, it provides a solution for mutiple device control by PORTB. With PbHUB each of the IO can be configurated to input, output and analog in as you like. Unfortunatly this Unit is unnested. -It is build with a MEGA328, with a simple driver firmware inside. +**PbHub** Expander unit is a single-bus board which is controlled using GROVE PortB connector (The black port on the M5Go Base). +The expaner unit contains 6 ports all in 1 unit. PortB can be used as GPIO and Analog in (the two data lines are connected to GPIO36 and GPIO26 on the ESP32 module). +Similar to the PaHub Unit, the PbHub provides solution for multiple devices control using a single port - PortB. With PbHub each of the IO can be configured as input and output, it has a built-in MEGA328 MCU with a simple driver firmware installed. + +*Notice: Please pay attention to the order of the channels while programing the PbHub* -*Notice1: Please pay attention to the channel order while programing*

-*Notice2: Not all M5Units with PortB(Black) is able to extended by PbHUB. PbHUB can only apply to basic single-bus communication like digital read and write, analog read and write, which is implemented by I2C protocol(MEGA328 inside).
-The mechanism of PbHUB as an extension of PortB which inplement the single-bus data transfer, is using the resource on Mega328 include GPIO, AD, DA ports, to inplement the functionality of digital read and write , analog read and write. So there must be exceptions in which case a PbHUB is not a option. For example, PortB M5Unit like WEIGH (HX711 inside), whose communication protocol is applied more than just anglog read, instead with a timing sequence. In that case PbHUB can't be helpful dirving those device or sensor.* + +*Notice2: Not all M5 Units with PortB (Black) are able to be extended by PbHUB. PbHUB can only apply to basic single-bus communication like digital read and write, analog read and write, which is implemented by I2C protocol (controlled by the MEGA328 MCU).
+ +The PbHub extension mechanism that allows it to control IO using a single-bus data transfer wires is embedded inside the Mega328 with pre-programmed functionalities such as: GPIO, AD and DA to enable digital read and write and analog read and write features. In this case, the PbHub is sometimes not necessary for applications that doesn't require such specific features or require features outside of the scope of the IO pins both for analog and digital IO. For example, if some project requires PWN functionalities - the PbHub won't be useful for such application as there is no support for PWN.* + See the below picture for timing sequence of HX711:
@@ -58,7 +63,7 @@ See the below picture for timing sequence of HX711: ## Change I2C Address -The I2C address of the unit is 0x40 (which can be changed by using solder resistors A0 ~ A2, the address range is 0x40~0x47). +The Default I2C address of the unit is 0x40 (which can be changed by using solder resistors A0 ~ A2, the address range is 0x40~0x47). @@ -126,15 +131,15 @@ The I2C address of the unit is 0x40 (which can be changed by using solder resist download EasyLoader ->1.EasyLoader is a simple and fast program burner. Every product page in EasyLoader provides a product-related case program. It can be burned to the master through simple steps, and a series of function verification can be performed. . +>EasyLoader is a precise and fast program writer which has a built-in functionalities related to the 4-Relay unit. The Easyloader program can burn the firmware to the main controller board by simple easy to follow steps. >2. After downloading the software, double-click to run the application, connect the M5 device to the computer through the data cable, select the port parameters, click **"Burn"** to start burning. (**For M5StickC burning, please Set the baud rate to 750000 or 115200**) -?>3. Currently EasyLoader is only suitable for Windows operating system, compatible with M5 system adopts ESP32 as the control core host. Before installing for M5Core, you need to install CP210X driver (you do not need to install with M5StickC as controller)[Click here to view the driver installation tutorial](en/related_documents/M5Burner#install-usb-driver) +>3. Currently EasyLoader is only suitable for Windows operating system, Please install the corresponding driver according to the device type. [Please click here to view the CP210X driver installation tutorial](en/arduino/arduino_development), M5StickC/V/T/ATOM series can be used without driver) ## PinMap -**Mega328 ISP**Download interface Pin foot definition +**Mega328 ISP** footprint definition @@ -142,23 +147,23 @@ The I2C address of the unit is 0x40 (which can be changed by using solder resist -## Exapmle +## Example ### 1. Arduino IDE -The code below is incomplete. To get complete code, please click [here](https://github.com/m5stack/M5Stack/tree/master/examples/Unit/PbHUB) +For the complete Arduino IDE code please click [here](https://github.com/m5stack/M5Stack/tree/master/examples/Unit/PbHUB) ### 2. UIFlow -If you want the complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/PbHUB/UIFlow) +For the Complete UIFlow example code please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/PbHUB/UIFlow) -- protovol type - I2C +- protocol type - I2C - address - 0x61 - Set oneLED Color : LED address(2bytes) + RGB value(3bytes) - Set moreLED Color : LED start address(2bytes) + LED end address(2bytes) + RGB value(3bytes) - +
Resources
@@ -199,5 +204,3 @@ If you want the complete code, please click [here](https://github.com/m5stack/M5 scrollFunc(); - -