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

Subcategories

  • 5 Topics
    23 Posts
    H
    thank you so much for sharing! this looks cool. I am pretty new to micropython for M5Stack. May I ask which IDE you primarily use to do Micropython programming?
  • All my M5Stack/Stick sketch doesn't compile anymore

    3
    0 Votes
    3 Posts
    6k Views
    C
    solved on commenting out gpio_deep_sleep_hold_dis(); in Documents/Arduino/libraries/M5Stack/src/utility/Power.cpp I don't know why, but now arduino compile
  • Esp32 arduino library version- pre releases

    2
    0 Votes
    2 Posts
    6k Views
    ajb2k3A
    @rob-biernat It can be hit and miss. Sometimes code on existing function changes resulting in broken code. You can try it but just be mindful of the issues the change may bring.
  • M5Stick (gray) usb power from code

    4
    0 Votes
    4 Posts
    6k Views
    C
    this is my solution: #include <M5Stack.h> #include <U8g2lib.h> uint8_t bat = M5.Power.getBatteryLevel(); U8G2_SH1107_64X128_1_4W_HW_SPI u8g2(U8G2_R1, /* cs=*/ 14, /* dc=*/ 27, /* reset=*/ 33); void setup(void) { M5.begin(); Wire.begin(); u8g2.begin(); Serial.begin(9600); } void loop(void) { delay(500); Batteria(); } void Batteria() {// u8g2.firstPage(); do { if (M5.Power.isCharging()) { // DEBUG Serial.println("Battery is charging"); u8g2.setFont(u8g2_font_battery19_tn); u8g2.drawGlyph(2, 20, 48); u8g2.setFont(u8g2_font_unifont_t_symbols); u8g2.drawGlyph(1, 16, 8623); //fulmine } else { u8g2.setFont(u8g2_font_battery19_tn); u8g2.drawGlyph(2, 20, 48); // VUOTA if (bat > 50) { u8g2.drawGlyph(2, 20, 49); // una tacca } if (bat > 100) { u8g2.drawGlyph(2, 20, 50); // //due tacche } if (bat > 150) { u8g2.drawGlyph(2, 20, 51); // tre tacche } if (bat > 200) { u8g2.drawGlyph(2, 20, 52); // quattro tacche } if (bat > 250) { u8g2.drawGlyph(2, 20, 53); // cinque tacche } } /// FOR DEBUG///// //u8g2.setFont(u8g2_font_7Segments_26x42_mn); //u8g2.setCursor(20, 52); //u8g2.print(bat); //Serial.print(bat); //Serial.println(" %"); } while ( u8g2.nextPage() ); } right now.....
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    74 Views
    No one has replied
  • Read from SD card

    3
    0 Votes
    3 Posts
    7k Views
    lukasmaximusL
    Hi @Powersoft this is as simple as loading images from the flash. Only you just have to mount the sd and then point the directory towards the location of your file. import uos uos.sdconfig(uos.SDMODE_SPI,clk=18,mosi=23,miso=19,cs =4) uos.mountsd() image0 = M5Img(0, 0, "/sd/face.jpg", True) image0.show() Keep in mind these requirement: Image must be of jpg file type must not exceed 25kb in file size image name including extension must not exceed 10 letters
  • Port arduino mega interrupt code on M5STACK

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • step motor module for encoder..

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • m5stack_index.json file signature verification failed

    Moved
    6
    0 Votes
    6 Posts
    18k Views
    P
    @m5-docs I tried this - it starts the installation, but gives a message : Error downloading https://dl.espressif.com/dl/esptool-2.5.0-windows.zip java.lang.RuntimeException: java.lang.Exception: Error downloading https://dl.espressif.com/dl/esptool-2.5.0-windows.zip Until now none of the json links worked for me. Please help.
  • Problems compiling example M5stack with arduino ide

    3
    0 Votes
    3 Posts
    6k Views
    P
    Found the solution. a New clean install with the latest version. Now it's compiles well !
  • How to Init UART at the grove port of ESP32-CAM(Arduino)

    2
    0 Votes
    2 Posts
    7k Views
    H
    Serial2.begin(115200, SERIAL_8N1, 13, 4) and you can use Serial2 in grove
  • Arduino on linux with m5Stack

    5
    2 Votes
    5 Posts
    13k Views
    ajb2k3A
    Scratches Head and gets a splinter Is the install creating the symlink device? Sometimes I had issues with hardware in ubuntu and raspbian and had to manually create the link which then links back to ttyUSB0.
  • m5stack and arduino cant upload anything

    3
    0 Votes
    3 Posts
    9k Views
    ajb2k3A
    Glad you got it sorted. Most of the time, issues like this are the driver not working or the lead failing.
  • M5 Stack and Https site..

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • M5Timer example ino

    3
    0 Votes
    3 Posts
    5k Views
    ?
    Thank you for your answer. I try this weekend to understand the program and apply it. I think I did not understand something important related to timer and ticker. Have a nice weekend.
  • M5StickC example programs will not compile

    5
    0 Votes
    5 Posts
    8k Views
    lukasmaximusL
    @halojanus Which version of Arduino are you running? try to make sure your running the latest. There are some incompatibilities with the stick c libraries in older versions of arduino
  • MGTT with Treeview

    2
    0 Votes
    2 Posts
    5k Views
    B
    @bertram mqtt with treeview, sorry
  • [Solved]Driving a single servo

    7
    0 Votes
    7 Posts
    14k Views
    S
    @jimw Please try this code. Serial speed 115200 and the firmware (1.2.3-en) for micropython It is not for Arduino. #include <M5Stack.h> int servoPin = 5; void servoSet(int Angle, int Time) { int pulseWidth; int TimeCount; TimeCount = Time / 20; for (int i = 0; i <= TimeCount; i++) { pulseWidth = map(Angle, 0, 180, 544, 2400); digitalWrite(servoPin, HIGH); delayMicroseconds(pulseWidth); digitalWrite(servoPin, LOW); delayMicroseconds(20000 - pulseWidth); } } void setup() { M5.begin(); M5.Lcd.printf("M5Stack Servo test:\n"); pinMode(servoPin, OUTPUT); } void loop() { M5.Lcd.printf("Angle 45deg\n"); Serial.println("Angle 45deg"); servoSet(45, 1000); //45deg M5.Lcd.printf("Angle 135deg\n"); Serial.println("Angle 135deg"); servoSet(135, 1000); //135deg }
  • fatal error: pgmspace.h: No such file or directory

    2
    0 Votes
    2 Posts
    9k Views
    lukasmaximusL
    @zackng97 said in fatal error: pgmspace.h: No such file or directory: Error compiling for board Arduino Pro or Pro Mini. In your error log it says you are compiling for arduino pro "Error compiling for board Arduino Pro or Pro Mini." I imagine since your on the m5stack forums that you are not trying to program an arduino board. The m5stack board definitions and libraries need to be installed first and then the m5stack device selected in the board list and also the port must be correct. please see this video on how to get started with m5stack in the arduino ide https://www.youtube.com/watch?v=U2es-l4z2Zg
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied