🤖Have you ever tried Chat.M5Stack.com before asking??😎

Subcategories

  • 7 Topics
    19 Posts
    J
    @pabou try using uiflow to generate the code, then peek copy from there.
  • Can microSD card be accessed in UIFlow or with MicroPython?

    Pinned
    12
    0 Votes
    12 Posts
    36k Views
    H
    Yes, microSD cards can be accessed in UIFlow or with MicroPython. They allow you to read and write data from/to the microSD card, enabling storage and retrieval of information on compatible devices.
  • Cahnge Font Size in Python

    Pinned Moved
    22
    0 Votes
    22 Posts
    110k Views
    world101W
    The compileFont command quickly returns True, which seems to me that it’s not doing anything when I run it. His online font conversion tool still works to create the custom font (.fon) files, but they only seem to work on his lobo branch of MicroPython, not the standard uiFlow version of MP. It’s just crashes when I try to load the font and the lobo build does not crash when I do the import. Bummer!
  • 1 Votes
    4 Posts
    554 Views
    K
    Hi! Thanks to both of you for your answers. I managed to get it working by using a different approach-via Wi-Fi. However, I’m still curious: why couldn't I connect via UART? I suspect it might be related to the camera's firmware. It seems like the Unit CamS3 5MP Wi-Fi doesn't have default firmware to stream JPEG over UART. Is that correct? I’d love to understand why it works over Wi-Fi but fails over UART. I either managed to connect with camera (pin 17 and 18) but couldn't get any data back. Any insights would be greatly appreciated!
  • 0 Votes
    1 Posts
    977 Views
    No one has replied
  • 0 Votes
    1 Posts
    816 Views
    No one has replied
  • Library for 6-DoF IMU Pro Mini Unit

    2
    0 Votes
    2 Posts
    2k Views
    easytargetE
    @007jimmey A bit late to the party here but.. maybe of help to you or others The bmp280 temperature/humidity/pressure sensor is well known, there are lots of libraries for this (I2C) eg: https://github.com/robert-hh/BME280 it has it's own I2C address and is separate from the bmi270/bmm150 The bmi270 six axis sensor (acceleration and gyro) has a basic, large and slow driver here: https://github.com/micropython/micropython-lib/tree/master/micropython/drivers/imu/bmi270 I have my own pair of drivers for this: https://codeberg.org/easytarget/bmi270-micropython bmi270_fast.py is a drop-in replacement for the above driver, but is 5x smaller, and 25x faster loading. (92 ms vs 2.3 seconds..) bmi270_legacy.py is a work in progress full-feature driver I'm working on for my Tab5. It uses for the 'legacy config' (tablet/mobile phone featureset) and has motion and orientation sensors and interrupts available. But.. the BMM150 magnetometer is an issue, it is attached to the 'auxillary' bus of the BMI270, not to the main I2C bus. You can only to access it via special features in the BMI270, and none of the MicroPython drivers support it.
  • My Tab5 Extended GPIO and Power management library.

    3
    1 Votes
    3 Posts
    1k Views
    easytargetE
    @felmue Thank you! you are quite right! I hadn't really looked at what was happening properly :-( The pin needs to be toggled high then low with a ~50ms delay for a full power off, just toggling it high does a full reset (after 1 second). I really wish there was a state diagram (or similar) available for the code in the PMS150G power control MCU. I've extended my code to do the required pulse similar to your modification, and added a reset_device() method too. Plus relevant notes in the README etc, and done a new release. [testing shows that the poweroff happens immediately after the first pulse, I'm not sure why they attempt to pulse several times but I guess they are just making sure.. ;-)]
  • 0 Votes
    1 Posts
    910 Views
    No one has replied
  • uiflow-micropython build for M5PaperS3 experience

    4
    0 Votes
    4 Posts
    4k Views
    H
    @Paulskpt Hi, thank you for sharing. I'm new to paper s3 and i'm trying to use micropython. Do you know if there's a firmware that supports m5ui or lvgl?
  • Certificate based MQTT (AWS IoT) trouble with changed umqtt

    2
    0 Votes
    2 Posts
    2k Views
    S
    @sistar_hh said in Certificate based MQTT (AWS IoT) trouble with changed umqtt: Hi, unfortunately the micropython certificate handling for MQTT has been changed last year. good description Here is the new way to do it: Create an SSL context context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) context.verify_mode = ssl.CERT_REQUIRED # Load certificates context.load_verify_locations(cafile='/flash/certificate/ca.der') context.load_cert_chain('/flash/certificate/cert.der', '/flash/certificate/key.der') mqtt = MQTTClient(client_id=client, server=endpoint, port=8883, keepalive=1200, ssl=context) print("Connecting to AWS IoT...") mqtt.connect() print("Done") While the code and certificates work fine on ESP32-S3 Micropython they result in the following error on uiflow2 Traceback (most recent call last): File "<stdin>", line 74, in <module> File "<stdin>", line 52, in mqtt_connect File "/flash/libs/umqttn/simple.py", line 69, in connect File "ssl.py", line 1, in wrap_socket ValueError: The certificate validity has expired I triple checked the certificate validity.. Next suspect would be an incorrect system time. Therfore I set the time as follows before attempting to initialize a mqtt connection: sta_if = network.WLAN(network.STA_IF) sta_if.active(True) if sta_if.isconnected(): sta_if.disconnect() sta_if.connect(wifi_ssid, wifi_password) while not sta_if.isconnected(): utime.sleep(1) print("Connecting...") print("Connected:", sta_if.ifconfig()) print(f"time before NTP settime {time.localtime()}") ntptime.settime() print(f"time after NTP settime {time.localtime()}") import machine rtc = machine.RTC() Set manually to a known correct UTC date/time: (year, month, day, weekday, hour, minute, second, microsecond) rtc.datetime((2025, 3, 14, 1, 14, 0, 0, 0)) print("Manually set time:", machine.RTC().datetime()) Still I get the same error: Connecting... Connecting... Connecting... Connecting... Connected: ('192.168.5.0', '255.255.252.0', '192.168.4.1', '192.168.4.1') time before NTP settime (2025, 3, 14, 12, 8, 44, 5, 72) time after NTP settime (2025, 3, 14, 12, 8, 45, 5, 72) Manually set time: (2025, 3, 14, 5, 14, 0, 0, 67) Connecting to AWS IoT... MQTT Connection failed: The certificate validity has expired Traceback (most recent call last): File "<stdin>", line 79, in <module> File "<stdin>", line 57, in mqtt_connect File "/flash/libs/umqttn/simple.py", line 69, in connect File "ssl.py", line 1, in wrap_socket ValueError: The certificate validity has expired I used the micropython/umqtt.simple/umqtt/simple.py implementation installed as module umqttn in the /flash/libs folder. It differs from the m5stack implementation (which is currently broken for certificate based MQTT due to the described changes in Micropython). At this point I wonder why the same code (umqtt.simple, demo-code, exactly the same certificate files) work on an UMFeatherS2 MicroPython v1.24.1 but fail on MicroPython v1.24.0-dirty on 2025-03-06; M5STACK CoreS3 with ESP32S3. I would happy for any hint on how to solve this. Aha! When trying the following change: context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) context.verify_mode = ssl.CERT_OPTIONAL # Instead of CERT_REQUIRED I successfully connected!
  • 0 Votes
    3 Posts
    3k Views
    ajb2k3A
    @DarshanAtwal As long as you know how to program in micropython You can still use programs like Thonny to program directly.
  • CANT FIND COMPATIBLE VERSION FOR M5Stickc Plus 2

    4
    0 Votes
    4 Posts
    3k Views
    ajb2k3A
    @DarshanAtwal Use the latest version of UIFlow2 is its just a graphical front ent to Micropython. There is a console mode in UIFlow2 to directly access the Micropython or you can use a program to directly access Micropython.
  • aioble Bluetooth Low Energy on M5Stack CoreS3

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Working with multiple screens on Core2 and UIFlow 2.x firmware

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • v2.2.1 breaks web terminal download...?

    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • M5Stack Dial with Micropython and M5 libraries, without UIFlow 2?

    8
    0 Votes
    8 Posts
    7k Views
    P
    I can be more specific. When I "Download" from UI Flow 2 to the device, it works: Press BtnA to switch on. Press BtnA to switch off, once my program allows, with custom MPY: hold_pin = Pin(46, Pin.OUT) hold_pin.value(0) But a problem is if I LONG press (6 secs) BtnA, the device FULLY resets. It goes to the QR code and device Mac screen. That menu crashes almost immediately, meaning I can't rotate the dial to run my Python script. The only way to get it back working is to redownload from UI Flow 2? Is there a way to turn off that long-press reset function? Or to stop the QR code menu from crashing, so I can at least run my program? These details about long press BtnA or the reset button on the back don't seem to be covered by the main reference, https://docs.m5stack.com/en/core/M5Dial
  • Looking for MicroPython library for AXP2102 on M5Core2

    3
    0 Votes
    3 Posts
    3k Views
    kurikoK
    Hi @xPalter Have you tried XPowersLib? I think you can post an issue to the author to update AXP2102 https://github.com/lewisxhe/XPowersLib
  • Lcd driver for M5Stack Core2

    29
    2 Votes
    29 Posts
    96k Views
    W
    @Russ I had version 1.14 from you at the time https://github.com/russhughes/ili9342c_mpy which worked great for me for years on the M5Stack Core2. But now there is a new version of Core2 version 1.1 Unfortunately, this version no longer runs with your version 1.14. Is there a way to make the 1.14 version work with the new firmware 1.1? The differences between Core2 and Core2 v1.1 are as follows: 1.The power management scheme is iterated from Core2(AXP192) to Core2 v1.1(AXP2101+INA3221). The ID of AXP192 and AXP2101 is different, and the program uses this as a sign to distinguish the versions; 2.The power indicator is changed from green to blue; 3.Add RTC chip power supply battery to ensure accurate timing when power is off.
  • M5Paper SDCard access

    10
    0 Votes
    10 Posts
    19k Views
    R
    @mehulge stuck with same issue, did you ever found the fix?
  • M5 Stack Unit V K210

    2
    0 Votes
    2 Posts
    2k Views
    ajb2k3A
    @JDZAWODNIAK not at present as I haven’t had time to work on a project.