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.
The I2C address of this unit is 0x40(Changable by resistors).
Notice: Please pay attention to the channel order while programing
Product Features
- Single-Bus GROVE PORTB Expander
- Two Lego-compatible holes
- 1-To-6
Kit includes
- 1x PbHUB Unit
- 1x Grove Cable
More information
Schematic
Driver Protocol
-
Driver firmware - PbHUB
-
Test code - PbHUB
-
protovol 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)
state | IO0 Digital Write | IO1 Digital Write | IO0 Analog Write | IO1 Analog Write | IO0 Digital Read | IO1 Digital Read | IO0 Analog Read | reserve | Set Neopixle 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 | 46 | 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 |