🤖Have you ever tried Chat.M5Stack.com before asking??😎
  • 0 Votes
    2 Posts
    4k Views
    ajb2k3A
    Have you got the correct port selected for the M5StickCPlus in arduino?
  • Unable to load new FW from Arduino IDE.

    Arduino arduino c++ esp32
    4
    0 Votes
    4 Posts
    7k Views
    F
    @teastain This is en backtrace decoded: PC: 0x04d25826 EXCVADDR: 0x04d25824 Decoding stack results 0x40090d71: prvIdleTask at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c line 3382 0x4008f5b6: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143
  • 0 Votes
    2 Posts
    7k Views
    W
    @wsanders At least with respect to the LCD library: The only function implemented so far to manipulate whole images is drawBitmap. drawJpg and drawJpgFile are commented out in https://github.com/m5stack/M5StickC-Plus/blob/master/src/M5Display.h so I assume they aren't working yet. So my workflow for now is: Save the image from gimp in gimp's ".h" format. This is smaller than a xpm or bmp. You will get a static char *data structure of all the pixels in the image. The .h file includes a macro to extract the pixels: #define HEADER_PIXEL(data,pixel) { pixel[0] = (((data[0] - 33) << 2) | ((data[1] - 33) >> 4)); pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); data += 4; } Write your own function rgb888to565 to compress the pixels into a uint16_t. Draw a bitmap of the image as fast as you can: #include <M5StickCPlus.h> #include "1.h" int pixel[3]; // pointer fu to preserve the start of .h data char *datastart; uint16_t *bitmap; void setup() { M5.begin(); M5.Lcd.setRotation(3); bitmap = (uint16_t *)malloc(height * width * 2); } void loop() { M5.Lcd.fillScreen(GREEN); datastart = data; for (int16_t y=0; y < height; y++) { for (int16_t x=0; x < width; x++) { HEADER_PIXEL(data, pixel); bitmap[60*y + x] = rgb888to565(pixel[0], pixel[1], pixel[2]); } } M5.Lcd.drawBitmap(0,0,width,height,bitmap); data = datastart; } Or you can use the Sprite library, which works well.
  • 0 Votes
    3 Posts
    7k Views
    E
    Hi @felmue and thanks for the help. I changed GPIO and it works now. Strange as input port 2 worked when the temperature sensor were implemented separably. However I have spend enough time trying to make it work. So I will not conplain now that it is working. Thanks again
  • M5Stack LoRa and ThingSpeak

    Arduino esp32 c++ arduino
    3
    0 Votes
    3 Posts
    9k Views
    T
    So, I have 2 m5stack core with me. My idea is to have these 2(or potentially more) to communicate with each other via LoRa, one to be a sensor node, and another acts as a receiver. The receiving node will then upload the data received from the sensing node to thingspeak. The components used in this system is the ENV sensor, and the LoRa modules. I hope this explains what I am trying to do.
  • M5Stack LCD Auto Clear

    Arduino arduino esp32 c++
    2
    0 Votes
    2 Posts
    8k Views
    m5stackM
    most M5Stack Arduino API , you can find it from this page. link:https://docs.m5stack.com/#/en/arduino/arduino_api
  • MQTT Library for Arduino

    Arduino esp32 arduino c++
    1
    3 Votes
    1 Posts
    7k Views
    No one has replied