Watering Unit U105 with PBHUBUnit ?
-
Is someone Capable of teaching how the Watering Unit U105 with a Port B PBHUBUnit can work?
I use the Core S3 Machine.
i try:
from unit import PBHUBUnit
from unit import WateringUnit
global pbhub_0, watering_0 ....i2c1 = I2C(1, scl=Pin(8), sda=Pin(9), freq=400000)
pbhub_0 = PBHUBUnit(i2c1, 0x61)
watering_0 = WateringUnit(PBHUBUnit(i2c=i2c1, channel=0, address=0x61))but this code seems to work only for i2c devices, and not for GPIO Pins to Init the PBHub.
Can someone tell me how i must init the Device and activate the Waterpump or read the Values from the Machine ?Normally i would use the GPIO Pins directly, but i need 1 device more to use:
watering_0 = WateringUnit((8, 9))I read something to write to 0x40, but i get really confused how this will work to read the Value or switch the Pump on or off.
Can someone explain that to me at time, thanks ! -
Hello @NoobCheck1
looking through the source code of UIFlow2 I don't think any of the Port B units are prepared to be used through PBHub (yet).
That said, you could try the following: Only add the PBHub unit, connect the watering unit to channel 0 and then try below commands to turn the water pump on for 2 seconds.
Please note: I do not have the necessary M5Stack hardware to actually test this myself, so I could be wrong.
Thanks
Felix -
@felmue NICE, if i use IO 0 on value 1 or 0 it switches on and off the pump on port C with the PB.Hub.
and also the analog value reading i can read on port c from this device.
I thougt first i must plug the PB.HUBUnit in Port B, but this seems a wrong suggestion.
On port B it tells me always the PB.HUBUnit cannot found and does nothing? Confusing.so for the first step, im happy and thanks.
So can you maybe Explain me, or just tell me, is it ok, to use 2 Pumps on this port C with the HUB and Switch them eventually Both on, or use them so much Power that i can destroy the Port or Hole Device with this action ?
How do i calculate this, or what is the Maximum for this Ports... on my next step i wanna a a weight Unit to confirm the moisture value of the capacitive sensor..
-
Hello @NoobCheck1
I am glad to hear you got it working.. And thank you for reporting back and letting me know that IO 0 is correct for the pump.
The power for the water pump(s) comes from the M5CoreS3. In the PbHub unit 5 V is just wired through. Unfortunately I don't know what the maximum power is that the M5CoreS3 can deliver on its Groove ports.
If you want to be on the save side you could use an external / additional power supply for the pump(s). See here.
Thanks
Felix -
@felmue oh, nice and inexpensive problem solver product. i will use it. For now i have a extra Power Supply for the S3 Device with 12V2A output and set the external Power in UIFlow to Output Mode, but in the Product Page i read on the End it is for Port A and MBus. The MBus is for the Stacked Devices ? But currently there are not many Stackable Modules out that can be used with UIFlow on the S3. And i think Core 2 Modules will not work with the S3 Device when they can´t be added in UIFlow ?