Hello @Krmiller
I found another example using SDIO (instead of SPI) which works for me. You can find the correct GPIOs here - section: microSD SDIO mode.
Thanks
Felix
Hello @Krmiller
I found another example using SDIO (instead of SPI) which works for me. You can find the correct GPIOs here - section: microSD SDIO mode.
Thanks
Felix
Hello @Krmiller
I tried talking to the SD card on my M5Tab5 using Arduino myself but without any luck.
I think that maybe the Arduino SD library isn't ready (yet) for the ESP32-P4 in M5Tab5. See here - ESP32-P4 is not listed.
Thanks
Felix
Hi guys
have you tried the RGB module in Hardware? Works fine for me.
I created an example using an M5Atom to control 10 SK6812 RGB LEDs. You can find it in the UIFlow2 Project Zone: M5Atom_RGB_Test_UiFlow2.3.3
Thanks
Felix
Hello @kimtommy
hmm, works for me. Tested both: power off and deep sleep.
I created an example which might help you. You can find it in the UIFlow2 Project Zone: M5CoreInk_PowerOff_DeepSleep_Test_UIFlow2.3.2
Thanks
Felix
Hello @GermanSheepDog
below is an alternative function which works for me too:
#define PI4IOE5V6408_ADDR 0x43
#define OUTPUT_REG 0x05
void my_set_backlight(bool o) {
uint8_t data = M5.In_I2C.readRegister8(PI4IOE5V6408_ADDR, OUTPUT_REG, 200000);
if(o == true) data |= 0b10000000;
else data &= ~0b10000000;
M5.In_I2C.writeRegister8(PI4IOE5V6408_ADDR, OUTPUT_REG, data, 200000);
}
Thanks
Felix
Hello @GermanSheepDog
your my_set_backlight()
function works for me and my_set_backlight(true)
turns the backlight off (inverted logic).
void my_set_backlight(bool o) {
PI4IOE5V6408_Class p;
// false input, true output
p.setDirection(7, true);
// false off, true on ?
p.digitalWrite(7, o);
}
void setup()
{
auto cfg = M5.config();
cfg.serial_baudrate = 115200;
M5.begin(cfg);
M5StamPLC.begin();
}
void loop()
{
M5.update();
if(M5.BtnA.wasClicked() == true)
{
Serial.println("BtnA clicked - backlight on");
my_set_backlight(false);
}
if(M5.BtnC.wasClicked() == true)
{
Serial.println("BtnC clicked - backlight off");
my_set_backlight(true);
}
}
Thanks
Felix
P.S. the AI generated code did not work for me.
Hello @clydeps
I don't know the pitch of the connector. However my M5Tab5 came with a matching cable. Maybe double-check your box?
Thanks
Felix
Hello @scroggyg
I created a Modbus example for M5Tab5 controlling an ACSSR relay. You can find it in the UIFlow Project Zone: M5Tab5_Modbus_ACSSR_Test_UIFlow2.3.1
Thanks
Felix
Hello @scroggyg
well, I think it shouldn't be too difficult to modify the PwrCAN module to provide power to SYSVIN.
BTW: the PwrCAN module schematic uses the label HPWR
on the connectors and the same label is on the M5Bus. Have you actually measured the HPWR
pins of the M5Bus of the PwrCAN module? Maybe they are already connected?
Note: I cannot verify this myself as I do not have a PwrCAN module.
Thanks
Felix
Hello @scroggyg
M5Tab5 port A is powered through a switch (U26) which when turned on lets SYS_INT5V
through to SYS_EXT5VO
. The switch is enabled via EXT5V_EN
coming from one of the port expanders (U6).
In other words, M5Tab5 cannot be turned on via port A as initially the switch is off.
See schematic here and/or the backside of M5Tab5.
Thanks
Felix
Hello @hacxx
sorry, but I do not understand why you would reply to a post three years later. It just doesn't make sense to me.
Plus an M5Atom Lite doesn't stack well with any module as it doesn't have the M5Stack bus.
Thanks
Felix
Hello guys
I think that is what I wanted to tell you guys with my previous post. The i2c driver install error
, which I also get, does not prevent most of my units to work properly.
Out of all my units only two did not work and two I2C units would only work after switching the i2c speed to 400 k.
In other words I do not think the i2c driver install error
matters in regard with the Tube Pressure unit, which is not an I2C unit.
@Kenzo : do you have any other units you could try with your M5Tab5? Or any other core(s) you could try the Tube Pressure unit with?
Thanks
Felix
Hello @Kenzo
I think you might have misread my post. I do not have a Tube Pressure unit so I cannot test this case, sorry.
Thanks
Felix
Hi guys
I tested M5Tab5 (running UIFlow 2.3.1) with all the units I have available and most of them worked ok.
Note: I also got the i2c driver install error
, but it didn't cause I2C to actually fail.
GPIO units
I2C units (bus speed 100k)
I2C units (bus speed 400k)
Unit Gesture and AMeter did not work for me with either bus speed 100k or 400k. M5Tab5 seemed to hang in setup and a hard reset was required.
Thanks
Felix
Hello @foofera
hmm, the I2C communication working in setup()
suggest the wiring is ok.
Are you using pull-up resistors on intSCL
and intSDA
?
Have you tried lowering the I2C bus speed?
Have you tried to put a delay between issuing I2C commands in your loop()
code?
Have you tried to control a different I2C slave device from your STM32? Does that work in both setup()
and loop()
?
Thanks
Felix
Hello @xgonc
maybe try with a short delay() before the first loop?
BTW: the included PoE example works for me.
Thanks
Felix
Hello @bensonwhlee
try adding a delay(500)
before calling pbhub.begin()
. My above linked code fails to initialize PbHub without a delay.
Thanks
Felix
Hello @wjcarpenter
the battery charging IC is TP4057 and battery voltage is measured via R40 / R41 into GPI38. See second page of the schematics here.
Thanks
Felix