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

Subcategories

  • Hear all about new products, initiatives and events here.

    14 Topics
    20 Posts
    kurikoK
    UiFlow2.0 quick start for CoreMP135 has been released. https://docs.m5stack.com/en/guide/linux/coremp135/uiflow2
  • 2 Topics
    2 Posts
    ajb2k3A
    Members will have noticed that some of us have pictures instead of letters next to our names. This isn't anything to do with status but is a function of the forum available to most (if not all) forum member. To set a picture for your avater you need to click on your letter in the top right hand side of the screen and a menu will appear. Click "Edit Profile" and you will be taken to the profile screen. At the top is a picture with your initial in it, click on it and you can upload an image to use.
  • Here is where you'll find News about promotions, M5stack related blog posts and Videos from M5stack users

    233 Topics
    308 Posts
    S
    To fix issues with M5Burner on Mac, ensure you’ve installed the correct USB-to-serial drivers (like CP210x or CH340). Run M5Burner using Rosetta if needed. Allow app permissions via System Settings > Privacy & Security. Always download the latest M5Burner version compatible with your mac.
  • Conect RFID unit to database

    2
    0 Votes
    2 Posts
    3k Views
    m5stackM
    You need to figure out what form you want to submit data to the database? If it is via the network, you need to have a back-end service support to help you process the data. and save data to the database.
  • [Solved] https request ends in error 12: "ENOMEM"

    3
    0 Votes
    3 Posts
    9k Views
    M5StickFreaklerM
    It works with Firmware V1.5.1 and above
  • Problems with Vibrator Motor Unit in uiflow

    4
    0 Votes
    4 Posts
    8k Views
    ajb2k3A
    Don't use it on port A use it only on port B. Confirmed, the motor doesn't work properly. I am sure that the unit only works as on or off as it only has an on/off transistor not a PWMable transistor.
  • [Solved] Pb.Hub and Pa.Hub grayed out?

    5
    0 Votes
    5 Posts
    10k Views
    M5StickFreaklerM
    @skink said in Pb.Hub and Pa.Hub grayed out?: @M5StickFreakler Start the Desktop IDE Version (Offline Version) of UIFlow, then go to "CheckUpdate" there you start the update to the new version 1.0.9.1 then Pb.HUB and Pa.HUB are activated again and you can access them ! You may have to install the software completely again !? greetings skink Hi skink This was my mistake. I have already the newest version of UI-Flow installed but I didn't realized, that I have to change the Version via the following button too: [image: 1588881439979-a3a9a98c-ae4e-4cbc-a6b9-87a1f7035809-image.png] So I have switched to V1.5.1 and now the pa.Hub and Pb.Hub aren't grayed out. Too dumb of me. Thank you and best regards Thomas
  • PaHub: Arduino code for setting port HIGH or LOW

    4
    0 Votes
    4 Posts
    8k Views
    liemphL
    @maxbrito Glad to hear that. Yes, sometimes the documentations are not enough especially for people new to M5.
  • https is working! was: Reset your password

    5
    0 Votes
    5 Posts
    11k Views
    P
    And now is it time to reset your password on the community site
  • Why is the community forum not on HTTPS

    5
    1 Votes
    5 Posts
    12k Views
    P
    I want to thank @m5stack for tacking action. To setup https on the community site.
  • real time data log from serial monitor in arduino

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Pins on Faces module not connected?

    2
    0 Votes
    2 Posts
    5k Views
    ajb2k3A
    @technerdchris said in Pins on Faces module not connected?: Hi, I'm wanting to interface my M5stack with external circuits and am using a faces board. Is there any reason that none of the external pins have connections? I check with oscilloscope and there is nothing at 5v 3v3 or gpio 36. I have interfaced with plenty of circuits with ESP32, arduino, and chipKIT, but this is my first attempt with m5stack. When the base has its pins press in to the faces dock, it looks like these pins should be connected... In the image, the red arrow is pointing to the pins I'm trying to use. Looking at the sticker, the arrow should be pointing at GND. From left to right on the image then should be 5V, 3V3, BAT, RST, and GPIO 36. I first used the header pins in the breadboard to connect and then I went into the pins of faces dock directly with o'scope. What am I doing wrong? [image: EjPLvKc.jpg] Please email M5Stack technical about this as they should be working.
  • Quick Start Guide Images are Broken

    1
    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • Measurements (temp/humi) by DHT12 on ENV Hat

    3
    1
    0 Votes
    3 Posts
    6k Views
    A
    Hi ajb2k3, thanks for your response. I found this thread that explain issue M5 Stickc Arduino samples - Temperature reading issue but i can not find any thread that report some solution, could you help me ?
  • Bricked M5StickC after bad AXP192 config?

    4
    0 Votes
    4 Posts
    10k Views
    T
    Apparently this was caused by accidentally writing 0x0 to AXP192_DCDC13_LDO23_CONTROL which turned off DCDC1 which provides power to ESP32 chip. The behaviour I was seeing was normal boot and then the firmware turning DCDC1 off. I was able to revive the M5StickC by connecting G0 to GROUND and randomly doing short and long power button presses while trying to erase flash. After few tries erase flash command suddenly succeeded.
  • (SOLVED)M5Stack WIFI Upload file on SD in AP mode

    2
    0 Votes
    2 Posts
    7k Views
    C
    This one work on M5Stack!!!!! /* */ #include "M5Stack.h" #include <WiFi.h> #include <WiFiClient.h> #include <WebServer.h> #define ServerVersion "1.0" String webpage = ""; bool SD_present = false; #include "index.h" //Web page header file WebServer server(80); //=============================================================== // Setup //=============================================================== void setup(void) { Serial.begin(115200); Serial.println(); Serial.println("Booting Sketch..."); //ESP32 As access point IP: 192.168.4.1 WiFi.mode(WIFI_AP); //Access Point mode WiFi.softAP("ESPWebServer", "12345678"); //Password length minimum 8 char //---------------------------------------------------------------- Serial.print(F("Initializing SD card...")); if (!SD.begin(TFCARD_CS_PIN, SPI, 40000000)) { // see if the card is present and can be initialised. Wemos SD-Card CS uses D8 Serial.println(F("Card failed or not present, no SD Card data logging possible...")); SD_present = false; } else { Serial.println(F("Card initialised... file access enabled...")); SD_present = true; } ///////////////////////////// Server Commands server.on("/", HomePage); server.on("/download", File_Download); server.on("/upload", File_Upload); server.on("/fupload", HTTP_POST, []() { server.send(200); }, handleFileUpload); ///////////////////////////// End of Request commands server.begin(); Serial.println("HTTP server started"); } //=============================================================== // This routine is executed when you open its IP in browser //=============================================================== void loop(void) { server.handleClient(); delay(1); } // All supporting functions from here... //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void HomePage() { SendHTML_Header(); webpage += F("<a href='/download'><button>Download</button></a>"); webpage += F("<a href='/upload'><button>Upload</button></a>"); append_page_footer(); SendHTML_Content(); SendHTML_Stop(); // Stop is needed because no content length was sent } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void File_Download() { // This gets called twice, the first pass selects the input, the second pass then processes the command line arguments if (server.args() > 0 ) { // Arguments were received if (server.hasArg("download")) SD_file_download(server.arg(0)); } else SelectInput("Enter filename to download", "download", "download"); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void SD_file_download(String filename) { if (SD_present) { File download = SD.open("/" + filename); if (download) { server.sendHeader("Content-Type", "text/text"); server.sendHeader("Content-Disposition", "attachment; filename=" + filename); server.sendHeader("Connection", "close"); server.streamFile(download, "application/octet-stream"); download.close(); } else ReportFileNotPresent("download"); } else ReportSDNotPresent(); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void File_Upload() { append_page_header(); webpage += F("<h3>Select File to Upload</h3>"); webpage += F("<FORM action='/fupload' method='post' enctype='multipart/form-data'>"); webpage += F("<input class='buttons' style='width:40%' type='file' name='fupload' id = 'fupload' value=''><br>"); webpage += F("<br><button class='buttons' style='width:10%' type='submit'>Upload File</button><br>"); webpage += F("<a href='/'>[Back]</a><br><br>"); append_page_footer(); server.send(200, "text/html", webpage); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ File UploadFile; void handleFileUpload() { // upload a new file to the Filing system HTTPUpload& uploadfile = server.upload(); // See https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer/srcv // For further information on 'status' structure, there are other reasons such as a failed transfer that could be used if (uploadfile.status == UPLOAD_FILE_START) { String filename = uploadfile.filename; if (!filename.startsWith("/")) filename = "/" + filename; Serial.print("Upload File Name: "); Serial.println(filename); SD.remove(filename); // Remove a previous version, otherwise data is appended the file again UploadFile = SD.open(filename, FILE_WRITE); // Open the file for writing in SPIFFS (create it, if doesn't exist) filename = String(); } else if (uploadfile.status == UPLOAD_FILE_WRITE) { if (UploadFile) UploadFile.write(uploadfile.buf, uploadfile.currentSize); // Write the received bytes to the file } else if (uploadfile.status == UPLOAD_FILE_END) { if (UploadFile) // If the file was successfully created { UploadFile.close(); // Close the file again Serial.print("Upload Size: "); Serial.println(uploadfile.totalSize); webpage = ""; append_page_header(); webpage += F("<h3>File was successfully uploaded</h3>"); webpage += F("<h2>Uploaded File Name: "); webpage += uploadfile.filename + "</h2>"; webpage += F("<h2>File Size: "); webpage += file_size(uploadfile.totalSize) + "</h2><br>"; append_page_footer(); server.send(200, "text/html", webpage); } else { ReportCouldNotCreateFile("upload"); } } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void SendHTML_Header() { server.sendHeader("Cache-Control", "no-cache, no-store, must-revalidate"); server.sendHeader("Pragma", "no-cache"); server.sendHeader("Expires", "-1"); server.setContentLength(CONTENT_LENGTH_UNKNOWN); server.send(200, "text/html", ""); // Empty content inhibits Content-length header so we have to close the socket ourselves. append_page_header(); server.sendContent(webpage); webpage = ""; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void SendHTML_Content() { server.sendContent(webpage); webpage = ""; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void SendHTML_Stop() { server.sendContent(""); server.client().stop(); // Stop is needed because no content length was sent } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void SelectInput(String heading1, String command, String arg_calling_name) { SendHTML_Header(); webpage += F("<h3>"); webpage += heading1 + "</h3>"; webpage += F("<FORM action='/"); webpage += command + "' method='post'>"; // Must match the calling argument e.g. '/chart' calls '/chart' after selection but with arguments! webpage += F("<input type='text' name='"); webpage += arg_calling_name; webpage += F("' value=''><br>"); webpage += F("<type='submit' name='"); webpage += arg_calling_name; webpage += F("' value=''><br>"); webpage += F("<a href='/'>[Back]</a>"); append_page_footer(); SendHTML_Content(); SendHTML_Stop(); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void ReportSDNotPresent() { SendHTML_Header(); webpage += F("<h3>No SD Card present</h3>"); webpage += F("<a href='/'>[Back]</a><br><br>"); append_page_footer(); SendHTML_Content(); SendHTML_Stop(); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void ReportFileNotPresent(String target) { SendHTML_Header(); webpage += F("<h3>File does not exist</h3>"); webpage += F("<a href='/"); webpage += target + "'>[Back]</a><br><br>"; append_page_footer(); SendHTML_Content(); SendHTML_Stop(); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void ReportCouldNotCreateFile(String target) { SendHTML_Header(); webpage += F("<h3>Could Not Create Uploaded File (write-protected?)</h3>"); webpage += F("<a href='/"); webpage += target + "'>[Back]</a><br><br>"; append_page_footer(); SendHTML_Content(); SendHTML_Stop(); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ String file_size(int bytes) { String fsize = ""; if (bytes < 1024) fsize = String(bytes) + " B"; else if (bytes < (1024 * 1024)) fsize = String(bytes / 1024.0, 3) + " KB"; else if (bytes < (1024 * 1024 * 1024)) fsize = String(bytes / 1024.0 / 1024.0, 3) + " MB"; else fsize = String(bytes / 1024.0 / 1024.0 / 1024.0, 3) + " GB"; return fsize; } and this is the page void append_page_header() { webpage = F("<!DOCTYPE html><html>"); webpage += F("<head>"); webpage += F("<title>File Server</title>"); // NOTE: 1em = 16px webpage += F("<meta name='viewport' content='user-scalable=yes,initial-scale=1.0,width=device-width'>"); webpage += F("<style>"); webpage += F("body{max-width:65%;margin:0 auto;font-family:arial;font-size:105%;text-align:center;color:blue;background-color:#F7F2Fd;}"); webpage += F("ul{list-style-type:none;margin:0.1em;padding:0;border-radius:0.375em;overflow:hidden;background-color:#dcade6;font-size:1em;}"); webpage += F("li{float:left;border-radius:0.375em;border-right:0.06em solid #bbb;}last-child {border-right:none;font-size:85%}"); webpage += F("li a{display: block;border-radius:0.375em;padding:0.44em 0.44em;text-decoration:none;font-size:85%}"); webpage += F("li a:hover{background-color:#EAE3EA;border-radius:0.375em;font-size:85%}"); webpage += F("section {font-size:0.88em;}"); webpage += F("h1{color:white;border-radius:0.5em;font-size:1em;padding:0.2em 0.2em;background:#558ED5;}"); webpage += F("h2{color:orange;font-size:1.0em;}"); webpage += F("h3{font-size:0.8em;}"); webpage += F("table{font-family:arial,sans-serif;font-size:0.9em;border-collapse:collapse;width:85%;}"); webpage += F("th,td {border:0.06em solid #dddddd;text-align:left;padding:0.3em;border-bottom:0.06em solid #dddddd;}"); webpage += F("tr:nth-child(odd) {background-color:#eeeeee;}"); webpage += F(".rcorners_n {border-radius:0.5em;background:#558ED5;padding:0.3em 0.3em;width:20%;color:white;font-size:75%;}"); webpage += F(".rcorners_m {border-radius:0.5em;background:#558ED5;padding:0.3em 0.3em;width:50%;color:white;font-size:75%;}"); webpage += F(".rcorners_w {border-radius:0.5em;background:#558ED5;padding:0.3em 0.3em;width:70%;color:white;font-size:75%;}"); webpage += F(".column{float:left;width:50%;height:45%;}"); webpage += F(".row:after{content:'';display:table;clear:both;}"); webpage += F("*{box-sizing:border-box;}"); webpage += F("footer{background-color:#eedfff; text-align:center;padding:0.3em 0.3em;border-radius:0.375em;font-size:60%;}"); webpage += F("button{border-radius:0.5em;background:#558ED5;padding:0.3em 0.3em;width:20%;color:white;font-size:130%;}"); webpage += F(".buttons {border-radius:0.5em;background:#558ED5;padding:0.3em 0.3em;width:15%;color:white;font-size:80%;}"); webpage += F(".buttonsm{border-radius:0.5em;background:#558ED5;padding:0.3em 0.3em;width:9%; color:white;font-size:70%;}"); webpage += F(".buttonm {border-radius:0.5em;background:#558ED5;padding:0.3em 0.3em;width:15%;color:white;font-size:70%;}"); webpage += F(".buttonw {border-radius:0.5em;background:#558ED5;padding:0.3em 0.3em;width:40%;color:white;font-size:70%;}"); webpage += F("a{font-size:75%;}"); webpage += F("p{font-size:75%;}"); webpage += F("</style></head><body><h1>File Server "); webpage += String(ServerVersion) + "</h1>"; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void append_page_footer(){ // Saves repeating many lines of code for HTML page footers webpage += F("<ul>"); webpage += F("<li><a href='/'>Home</a></li>"); // Lower Menu bar command entries webpage += F("<li><a href='/download'>Download</a></li>"); webpage += F("<li><a href='/upload'>Upload</a></li>"); webpage += F("</ul>"); webpage += "<footer>&copy;"+String(char(byte(0x40>>1)))+String(char(byte(0x88>>1)))+String(char(byte(0x5c>>1)))+String(char(byte(0x98>>1)))+String(char(byte(0x5c>>1))); webpage += String(char((0x84>>1)))+String(char(byte(0xd2>>1)))+String(char(0xe4>>1))+String(char(0xc8>>1))+String(char(byte(0x40>>1))); webpage += String(char(byte(0x64/2)))+String(char(byte(0x60>>1)))+String(char(byte(0x62>>1)))+String(char(0x70>>1))+"</footer>"; webpage += F("</body></html>"); }
  • m5stack EuroMillions APP help

    10
    0 Votes
    10 Posts
    15k Views
    B
    @crami25 Hello again. I have redone all the sorting/tipping/drawing stuff. And now the code works as I wanted it. Code is not optimized for size but seems to work. I posted the new code here https://pastebin.com/fq7AVKrG NOW the "random" numbers are "random" even with "tweaks" actives. Thanks for your support and help. Any sugestions/remarks are welcome as always.
  • [Solved] 5 RELAY Units on M5Stack device

    3
    0 Votes
    3 Posts
    7k Views
    M5StickFreaklerM
    @crami25 Thank you crami25 I thought that I have to use the RELAY-Unit-Component and the PbHub.Unit-Component simultaneously in UIFlow. But as you told me, I just have to set the Outputs on the PbHub to 0 oder 1 :-) No need of the RELAY-Unit-Component in software. from m5stack import * from m5ui import * from uiflow import * import unit setScreenColor(0x222222) pbhub0 = unit.get(unit.PBHUB, unit.PORTA) while True: pbhub0.digitalWrite(0, 0, 1) wait_ms(100) pbhub0.digitalWrite(1, 0, 1) wait_ms(100) pbhub0.digitalWrite(2, 0, 1) wait_ms(100) pbhub0.digitalWrite(3, 0, 1) wait_ms(100) pbhub0.digitalWrite(4, 0, 1) wait(1) pbhub0.digitalWrite(0, 0, 0) wait_ms(100) pbhub0.digitalWrite(1, 0, 0) wait_ms(100) pbhub0.digitalWrite(2, 0, 0) wait_ms(100) pbhub0.digitalWrite(3, 0, 0) wait_ms(100) pbhub0.digitalWrite(4, 0, 0) wait(1) Great it works! Best regards Thomas
  • Detect LongPress-Button (but not only when released button)

    3
    0 Votes
    3 Posts
    8k Views
    M5StickFreaklerM
    @sysdl132 said in Detect LongPress-Button (but not only when released button): @m5stickfreakler Try to set the longpress time shorter. Thanks for reply but that wasn't the question. My code in my post works fine. :-) But it would be great if the implemented Micropython standard solution (with events) didn't just trigger an event when I release the button. Like my alternative code, most people want that the event is triggered immediately after the "long press time" is past, not only when the button is released. So the Micropython event solution would be more powerful, if I could solve the "problem" in one code line instead of fifty. I am not such good in micropython but I think there is unfortunately no simpler solution for that.
  • Control Lego Power Functions via IR remote and blockly

    6
    0 Votes
    6 Posts
    14k Views
    ajb2k3A
    @freefaller the front end of UIFlow may be java but the back end code that gets sent to the M5Stack is Micropython
  • Wake on Motion/Shake to Wake

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Integrate into a "dock" or bench?

    4
    0 Votes
    4 Posts
    9k Views
    m5stackM
    @technerdchris yes , USB module go on top of the FACES and under the Core , then stack they together
  • [M5Stack Tutorial] Bilibili Fan Number Display

    9
    1
    0 Votes
    9 Posts
    14k Views
    lukasmaximusL
    @正负加减 really haha send me a message