Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Would M5 StickC Plus2 be supported flawlessly? #35

Open
sarkrui opened this issue Jan 4, 2024 · 13 comments
Open

[Question] Would M5 StickC Plus2 be supported flawlessly? #35

sarkrui opened this issue Jan 4, 2024 · 13 comments

Comments

@sarkrui
Copy link

sarkrui commented Jan 4, 2024

image
Hi Frank,

Thank you for developing this repository. I'm curious whether you have experimented with Plus2, an enhanced version of M5StickC Plus2, notably featuring an expanded battery and increased flash storage.

Following the steps outlined in INSTRUCTIONS.md, I successfully compiled and uploaded to Plus2 using PlatformIO. Despite this, the screen remains unlit and there's no response from the device. Could you advise on a suitable approach to begin troubleshooting this issue? I would assume the issue came from the new dependencies used in the Plus2 library, involving the M5Unified. Your assistance would be greatly appreciated.

Best regards,
Sark

@frank26080115
Copy link
Owner

I see that the LCD's pins have changed, original pins

#define TFT_MOSI 15
#define TFT_SCLK 13
#define TFT_CS   5   // Chip select line for TFT display on Shield
#define TFT_DC   23  // Data/command line for TFT on Shield
#define TFT_RST  18  // Reset line for TFT is handled by seesaw!

new pins

#define TFT_MOSI 15
#define TFT_SCLK 13
#define TFT_CS   5   // Chip select line for TFT display on Shield
#define TFT_DC   14  // Data/command line for TFT on Shield
#define TFT_RST  12  // Reset line for TFT is handled by seesaw!

can you try making this change inside https://github.com/frank26080115/alpha-fairy/blob/main/arduino_workspace/libraries/M5StickC-Plus/src/utility/In_eSPI_Setup.h and try again?

@supritsinghlab
Copy link

Did this work for you @sarkrui ? Coz I also have the StickC Plus2, and did the changes @frank26080115 you mentioned, the screen stays off. Could you check again once?

@GregFroning
Copy link

I'd also be interested in getting this going. Tried the above with no luck.

Attempted to start swapping to the M5Unified library but it looked like it was going to require quite a few changes. Might continue it later.

@supritsinghlab
Copy link

@frank26080115 is it possible for you to provide the micrpython version? It might be easier to port that to the new plus2.

@clopoff
Copy link

clopoff commented Aug 14, 2024

#define TFT_MOSI 15
#define TFT_SCLK 13
#define TFT_CS 5 // Chip select line for TFT display on Shield
#define TFT_DC 14 // Data/command line for TFT on Shield
#define TFT_RST 12 // Reset line for TFT is handled by seesaw!
#define TFT_BL 27
that works for me

@supritsinghlab
Copy link

@clopoff Thanks with the above, the display comes on now! However, it goes back to sleep quickly. Do you also see this behaviour? So it is still quite far away from its proper working.

@clopoff
Copy link

clopoff commented Aug 19, 2024

Yep. Buttons dont work correctly

@frank26080115
Copy link
Owner

I purchased one, it's coming from M5Stack/China so it'll take a while.

I think I can put in an ugly piece of code to check if the device is a PICO-D4 or a PICO-V3 and act accordingly

so I'm puzzled, I don't see this product anywhere else, but plenty of the older versions on Amazons with Prime shipping. is the 2nd generation actually a popular product or is it dead? I have stuff being manufactured with the PICO-D4 still and it's not like there's a stock shortage, it's not EoL or anything.

@nightflasher
Copy link

nightflasher commented Oct 19, 2024

recently bought the "wrong" version, also interested in some kind of port to the M5StickCPlus2

Edit:
display is working now, need to implement GPIO 4 (which needs to be HIGH to turn power on) and power button is pin 35.
At the moment, it's only powered with USB, but can't control by motion; and it's stuck in a bootloop.
The differences are well documented
https://docs.m5stack.com/en/core/M5StickC%20PLUS2

@nightflasher
Copy link

nightflasher commented Oct 20, 2024

I'm currently working very bad on the code and found "[E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263" in serial terminal. I think it's the AXP192 library, because they ditched on this part for GPIO38 TIMER POWER.
This seems to be working for the M5StickCPlus2
https://github.com/m5stack/M5Cardputer-UserDemo/tree/main/main%2Fhal%2Fbat

@tao-j
Copy link
Contributor

tao-j commented Nov 20, 2024

platformio/platform-espressif32#1492

platformio is not building thing correctly, for example, I cannot access the webpage like I used to on PLUS year ago. Exploring better toolchain to port to PLUS2.

@tao-j
Copy link
Contributor

tao-j commented Nov 20, 2024

btw, the main benefit of port to PLUS2 is to be able to have enough RAM/Flash to run a Bluetooth stack, which don't have very complicated camera ver compatibility issue. And a bit more stable (maybe)

@tao-j
Copy link
Contributor

tao-j commented Nov 22, 2024

#40

folks, try this out for PLUS2, almost the same experience except:
batt info not implemented
turn off logic is a bit different, but I don't think it's too much different.


platform espressif built non working binary with v6.9.0 so used 5.3.0, it seems that 6.3.0 might also work. Note that nowadays espressif arduino core have updated to 3.x however platform espressif still points to the old 2.x ver. There is a fiasco about esp not paying pio enough platformio/platform-espressif32#1225 so pio refuse to take community contribution (for free). The same fiasco happed to RPi Pico as well maxgerhardt/platform-raspberrypi#73. So ppl start to use their own fork https://github.com/pioarduino/platform-espressif32. However, porting THIS project to 3.x requires lots of effort: switch SPIFFS to LittleFS (I;ve done it https://github.com/tao-j/alpha-fairy/tree/v2-to-v3-migrate), adopt new wifi api (time consuming w/o debugger), new ledc api, etc. Also move ino to cpp is a huge undertake (https://github.com/tao-j/alpha-fairy/tree/cpp) since the modules are really highly coupled together..

for the board definition file 2.x esp-ardu use m5stick-c. 3.x esp-ardu use m5stack-stickc. The only useful thing about this is just to introduce the 'pin-def.h' file. But we are defining our pins by ourself anyways.

TODO that I will try to finish:

TODO that anyone can help:

  • add adc read for PLUS2 for batt voltage etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants