I think the Python code in these units was not implemented with PbHUB in mind at all. I agree with your suggested interface will be very useful. You can probably do this by deriving a HubAwareLight
class from Light
. The job of HubAwareLight
is to just set newdata
value in Light
ws1088
@ws1088
Posts made by ws1088
-
RE: Connect units to PbHUB
-
RE: Connecting Env Unit and RFID Unit via Grove Hub on M5StickC
@ajb2k3 said in Connecting Env Unit and RFID Unit via Grove Hub on M5StickC:
@ws1088 Confirmed, the RFID Unit will not work with the ENV unit and will not work with the ENV hat
wow, RFID unit will not work with ENV hat even? I though RFID unit is I2C (G32 and G33) and ENV hat is on G26 and G36...
-
RE: Problems with the I2C Grove Interface
@staind87 said in Problems with the I2C Grove Interface:
Hello dear M5Stack Team,
I come from Germany and unfortunately my English is not perfect.
I hope you can understand me.I think the 5MStack product line is really good. It's all in a nice case and the products are well made.
Now I unfortunately noticed a few things which are not so beautiful, but maybe I didn't see it correctly.It's about the I2C Grove interface. I think there are some hardware design bugs.
Unfortunately I can't see the I2C Grove interface in the schematics of the M5Stack.
Therefore I assume that SCL and SDA from the Grove interface are directly connected to the ESP32. (without logic)Now to the problems:
-
A level shifter is missing in the M5Stack.
If I look at the schematics of the sensors (e.g. the ENV unit) I can see that the pull-up resistors in the sensor modules are connected to 5V (VCC).
This means that 5V is connected to the inputs of the ESP32. The ESP32 only supports voltages up to 3.6V. The 5V voltage could demage the I2C inputs of the M5Stack.
With a level shifter in the M5Stack this problem could be solved. -
The pull-up resistors are built into the sensors.
Unfortunately the pull-up resistors are built into the sensors. This is very unfortunate because if I use the Unit Hub to use several sensors then I have several pull-up resistors parallel to my I2C bus.
The total resistance of the pullup is getting smaller and smaller due to this.
So maybe bigger circuits can't work anymore because the pullup resistance is too small.
Why is the pull-up resistor not installed centrally in the M5Stack?
I hope you don't misunderstand me. I love the M5Stack, but I noticed these problems.
Greetings from Germany
Staind
I recently have problems with using both ENV unit and TOF unit on a I2C hub on M5StickC. Using just 1 one of them at one time works. I wonder if this is related to what you discovered?
Also, would using a PaHub solve the problem?
-
-
RE: Documentation of all available python modules and APIs for M5StickC
@ajb2k3 said in Documentation of all available python modules and APIs for M5StickC:
Micropython is still unstable and constantly changing which is why there are not uptodate records.
M5Stack used to use the Loboris port but have since switched to their own port.
So then would a Firmata python client be more stable (since the Firmata protocol is stable)?
-
Documentation of all available python modules and APIs for M5StickC
I am trying to look for what I can do with micropython on M5StickC and couldn't find a comprehensive online documentation. Is there something like that?
For the core micropython code I can see there is a place to look for it. But for APIs specifically for M5StickC (of M5Stack), it seems like it is sorely missing. e.g. where is the API documented for:
lcd.setRotation()
etc? Thanks in advance!
-
RE: UIFlow source code for M5StickC?
@heybin Thanks. Is there a StickC branch for UIFLow_Code as well? I looked at https://github.com/m5stack/UIFlow-Code/blob/master/i2c_bus.py and PORTA is (21, 22) for M5Stack, not (32, 33) for M5StickC.
-
UIFlow source code for M5StickC?
Is UIFlow open source? Looks like the UIFlow for M5Stack is available in github, but I cannot find the code for M5StickC.
Generally, do you guys think it is a good idea to be able to build our only firmware (with micropython support for various units and component/drivers on M5StickC)?
-
RE: Battery life of M5StickC when it is powered OFF
@oliv said in Battery life of M5StickC when it is powered OFF:
@lukasmaximus : I agree with @ws1088 . Battery fully charged, long press on power switch to switch off the M5StickC should not drain battery in 5 hours.
I measured a consumption of 1.92 mA when off, which is too high :(
See measurements: http://community.m5stack.com/topic/1162/getting-longer-battery-run-time/5Today I did something different, I unplug every units from M5StickC and so far it still have battery when I tried to turn it on. After it is on, I turned it off immediately and will report out how long it will last. Sorry, I can only do these unscientific experiment :) I lack the knowledge and equipment to do otherwise.
-
RE: UIFlow USB Mode Questions
@ajb2k3 said in UIFlow USB Mode Questions:
@ws1088 said in UIFlow USB Mode Questions:
@lukasmaximus said in UIFlow USB Mode Questions:
The Api key is for connecting your stick c to the online version of uiflow (flow.m5stack.com) in the settings menu you can enter your apikey and switch from m5stack unit to stick c unit
The interesting thing is in
USB mode
you still get an apikey. I tried entering that key in the online version of UIFlow and it is not working...It wont work because in USB mode the M5Stack has not connected over the wifi and so the online UIFlow cannot find it.
This is a bug or a feature of the upcoming WebUSB function coming soon.Thanks, lets hope it is a feature for the online version of UIFlow instead of a bug :)