PbHub Expander unit is a single-bus board which is controlled using GROVE PortB connector (The black port on the M5Go Base). The expander 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.
Resources | Parameter |
---|---|
Communication protocol | I2C: 0x61(can be modified by resistance A0, A1, A2) |
Net weight | 7g |
Gross weight | 19g |
Product Size | 48*24*12mm |
Package Size | 67*53*12mm |
*Notice: Please pay attention to the order of the channels while programing the PbHub*
0-5V
, and the corresponding ADC resolution is 10bit
(1024), so when using an analog signal input with an input range less than 5V, it will not reach the maximum The value is 1024. 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.
Mega328 ISP footprint definition
The Default I2C address of the unit is 0x61 (which can be changed by using solder resistors A0 ~ A2, the address range is 0x61 ~ 0x68).
A0 | A1 | A2 | I2C Address |
---|---|---|---|
/ | / | / | 0x61 |
Resistors | / | / | 0x62 |
/ | Resistors | / | 0x63 |
Resistors | Resistors | / | 0x64 |
/ | / | Resistors | 0x65 |
Resistors | / | Resistors | 0x66 |
/ | Resistors | Resistors | 0x67 |
Resistors | Resistors | Resistors | 0x68 |
For the complete Arduino code please click here
For the Complete UIFlow example code please click here
state | IO0 Digital Write | IO1 Digital Write | IO0 Analog Write | IO1 Analog Write | IO0 Digital Read | IO1 Digital Read | IO0 Analog Read | reserve | Set RGB LED Num | Set oneLED Color* | Set moreLED Color* | Set Brightness |
---|---|---|---|---|---|---|---|---|---|---|---|---|
r/w | w | w | w | w | r | r | r | r | w | w | w | w |
data length (Byte) | 1 | 1 | 1 | 1 | 1 | 1 | 2 | / | 2 | 5 | 7 | 1 |
ch0 cmd | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 4A | 4B |
ch1 cmd | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 5A | 5B |
ch2 cmd | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 6A | 6B |
ch3 cmd | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 7A | 7B |
ch4 cmd | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 8A | 8B |
ch5 cmd | A0 | A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | AA | AB |