🤖Have you ever tried Chat.M5Stack.com before asking??😎
  • core2_factory_test.ino error i2c_err_t

    5
    0 Votes
    5 Posts
    4k Views
    U
    thank you for the reply ill try comenting that piece of code and see if it compile.
  • This topic is deleted!

    3
    0 Votes
    3 Posts
    77 Views
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • Core2 as AP and Station

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • bluetooth in core2

    8
    0 Votes
    8 Posts
    16k Views
    A
    @zontex it looks like there has been an update to Bluetooth on UiFlow for Core2: now it appears BLE Central and BLE peripheral options. Do you know what the difference is? Thanks! Alvaro B. [image: 1672158667179-79c8c1e3-9b0c-4e9f-9bff-60f9d64eca01-image-resized.png]
  • M5Stack programming with Visual Studio Code in Linux

    3
    1
    0 Votes
    3 Posts
    4k Views
    M
    My code consists of a single line: print("Hello m5") Are you suggesting clicking "Run in M5Stack" with that code would cause my trouble?
  • Core2 with Visual Studio Code

    micropython
    6
    0 Votes
    6 Posts
    17k Views
    M
    @kiwilogan I found that updating VSC and uninstalling and re-installing the M5Stack extension made that magic "Add M5Stack" button appear.
  • Where can I find the MAC address?

    5
    0 Votes
    5 Posts
    8k Views
    teastainT
    @dheco Serial.println(WiFi.macAddress());
  • Max amount of devices able to connect to M5Core2

    11
    0 Votes
    11 Posts
    11k Views
    ajb2k3A
    The limit to what can physically be connected is defined by how much power can be drawn from the Grove ports however there are adapters that will allow you to add additional power to the grove ports to help power devices. https://shop.m5stack.com/products/usb-typec2grove-unit https://shop.m5stack.com/products/grove2grove-expansion-unit
  • Core 2 connecting with W5500 LAN to Firebase RTDB

    6
    0 Votes
    6 Posts
    6k Views
    G
    Thanks to your steep pass it IT finally WORKS !!! Here are a few more stumbling blocks to be aware of: #define FB_ENABLE_EXTERNAL_CLIENT must be set for Ethernet connection. For WLAN it must be deactivated. Therefore WLAN worked again after reinstalling the lib as described above. you need to define the GPIO´s for Core 2 as following in the code trust_anchors URL => www.google.com seems to work as Firebase is a google product #include <M5Core2.h> is NOT necessary => if you use it with M5.begin you need to delete Serial.begin(115200) => otherwise your CPU will crash => known issue also thanks to felmue NTP server is not working => always returns 0 => seems to work without NTP Here is the working code i use: /** Created by K. Suwatchai (Mobizt) Email: k_suwatchai@hotmail.com Github: https://github.com/mobizt/Firebase-ESP-Client Copyright (c) 2022 mobizt */ /** This example shows the basic RTDB usage with external Client. This example used your Arduino device and WIZnet W5500 (Ethernet) device which SSLClient https://github.com/OPEnSLab-OSU/SSLClient will be used as the external Client. This SSLClient, https://github.com/OPEnSLab-OSU/SSLClient can't use in ESP8266 device due to wdt reset error. Don't gorget to define this in FirebaseFS.h #define FB_ENABLE_EXTERNAL_CLIENT */ #include <Firebase_ESP_Client.h> // Provide the token generation process info. #include <addons/TokenHelper.h> // Provide the RTDB payload printing info and other helper functions. #include <addons/RTDBHelper.h> #include <Ethernet.h> /* 1. Install SSLClient library */ // https://github.com/OPEnSLab-OSU/SSLClient #include <SSLClient.h> /* 2. Create Trus anchors for the server i.e. www.google.com */ // https://github.com/OPEnSLab-OSU/SSLClient/blob/master/TrustAnchors.md // or generate using this site https://openslab-osu.github.io/bearssl-certificate-utility/ #include "trust_anchors.h" // For NTP time client #include "MB_NTP.h" // For the following credentials, see examples/Authentications/SignInAsUser/EmailPassword/EmailPassword.ino /* 3. Define the API Key */ #define API_KEY "Key" /* 4. Define the RTDB URL */ #define DATABASE_URL "URL" //<databaseName>.firebaseio.com or <databaseName>.<region>.firebasedatabase.app /* 5. Define the user Email and password that alreadey registerd or added in your project */ #define USER_EMAIL "Email" #define USER_PASSWORD "password" /* 6. Defined the Ethernet module connection */ #define WIZNET_RESET_PIN 19 // Connect W5500 Reset pin to GPIO 19 for Core 2 #define WIZNET_CS_PIN 26 // Connect W5500 CS pin to GPIO 26 for Core 2 #define WIZNET_MISO_PIN 38 // Connect W5500 MISO pin to GPIO 38 for Core 2 #define WIZNET_MOSI_PIN 23 // Connect W5500 MOSI pin to GPIO 23 for Core 2 #define WIZNET_SCLK_PIN 18 // Connect W5500 SCLK pin to GPIO 18 for Core 2 /* 7. Define the analog GPIO pin to pull random bytes from, used in seeding the RNG for SSLClient */ const int analog_pin = 27; // Core 2 => GPIO 27 (Analog pin) /* 8. Define MAC */ uint8_t mac[] = { 0x12, 0x12, 0x12, 0x12, 0x12, 0x12 }; /* 9. Define IP (Optional) */ IPAddress ip(192, 168, 1, 50); IPAddress myDns(8, 8, 8, 8); // Define Firebase Data object FirebaseData fbdo; FirebaseAuth auth; FirebaseConfig config; unsigned long sendDataPrevMillis = 0; int count = 0; volatile bool dataChanged = false; EthernetClient basic_client; SSLClient ssl_client(basic_client, TAs, (size_t)TAs_NUM, analog_pin); // For NTP client EthernetUDP udpClient; MB_NTP ntpClient(&udpClient, "pool.ntp.org" /* NTP host /, 123 / NTP port /, 0 / timezone offset in seconds */); uint32_t timestamp = 0; void ResetEthernet() { Serial.println("Resetting WIZnet W5500 Ethernet Board... "); pinMode(WIZNET_RESET_PIN, OUTPUT); digitalWrite(WIZNET_RESET_PIN, HIGH); delay(200); digitalWrite(WIZNET_RESET_PIN, LOW); delay(50); digitalWrite(WIZNET_RESET_PIN, HIGH); delay(200); } void networkConnection() { Ethernet.init(WIZNET_CS_PIN); ResetEthernet(); Serial.println("Starting Ethernet connection..."); Ethernet.begin(mac); unsigned long to = millis(); while (Ethernet.linkStatus() == LinkOFF || millis() - to < 2000) { delay(100); } if (Ethernet.linkStatus() == LinkON) { Serial.print("Connected with IP "); Serial.println(Ethernet.localIP()); } else { Serial.println("Can't connect"); } } // Define the callback function to handle server status acknowledgement void networkStatusRequestCallback() { // Set the network status fbdo.setNetworkStatus(Ethernet.linkStatus() == LinkON); } // Define the callback function to handle server connection void tcpConnectionRequestCallback(const char *host, int port) { // You may need to set the system timestamp to use for // auth token expiration checking. if (timestamp == 0) { timestamp = ntpClient.getTime(2000 /* wait 2000 ms */); Serial.print("timestamp from NTP: "); Serial.println(timestamp); if (timestamp > 0) { Firebase.setSystemTime(timestamp); Serial.print("Firebase => setSystemTime done"); } } Serial.print("Connecting to server via external Client... "); if (!ssl_client.connect(host, port)) { Serial.println("failed."); return; } Serial.println("success."); } void setup() { SPI.begin(WIZNET_SCLK_PIN, WIZNET_MISO_PIN, WIZNET_MOSI_PIN, -1); Serial.begin(115200); networkConnection(); Serial_Printf("Firebase Client v%s\n\n", FIREBASE_CLIENT_VERSION); /* Assign the api key (required) */ config.api_key = API_KEY; /* Assign the user sign in credentials */ auth.user.email = USER_EMAIL; auth.user.password = USER_PASSWORD; /* Assign the RTDB URL (required) */ config.database_url = DATABASE_URL; /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; // see addons/TokenHelper.h /* fbdo.setExternalClient and fbdo.setExternalClientCallbacks must be called before Firebase.begin */ /* Assign the pointer to global defined external SSL Client object */ fbdo.setExternalClient(&ssl_client); /* Assign the required callback functions */ fbdo.setExternalClientCallbacks(tcpConnectionRequestCallback, networkConnection, networkStatusRequestCallback); Firebase.setDoubleDigits(5); Firebase.begin(&config, &auth); } void loop() { // Firebase.ready() should be called repeatedly to handle authentication tasks. if (Firebase.ready() && (millis() - sendDataPrevMillis > 15000 || sendDataPrevMillis == 0)) { sendDataPrevMillis = millis(); Serial_Printf("Set bool... %s\n", Firebase.RTDB.setBool(&fbdo, F("/test/bool"), count % 2 == 0) ? "ok" : fbdo.errorReason().c_str()); count++; } }
  • M5stack Core2 ENV III Bus error

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

    1
    0 Votes
    1 Posts
    28 Views
    No one has replied
  • M5Stack LVGL, Any Documentation?

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • UHF RFID Unit (JRD4035) on M5Core2

    m5core2 uhf examples help rfid
    9
    0 Votes
    9 Posts
    15k Views
    Bat21B
    Hello everyone Nobody with M5Core 2 and UHF RFID UNIT (JRD4035) running properly? Cheers.
  • This topic is deleted!

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

    1
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • M5Stack Core2, How to load Custom Font?

    3
    0 Votes
    3 Posts
    4k Views
    A
    I'm not seeing any error message, the device just restarts. I've tried to use the following code instead (without calling lcd.font): lcd.compileFont("./valera.c") label0 = M5Label('Hi', x=149, y=86, color=0x000, font=valera.fon, parent=None) While it doesn't cause restart the font isn't working (I've tried to search the generated files and compileFont doesn't seem to produce any .fon file, which shouldn't be the case) Side Note: my input .c file is less than 100 KB in size, as larger files caused crashes according to the comments in previous posts.
  • Core2 / VSCode : "Cannot read property 'sendCommand' of Undefined"

    2
    1
    4 Votes
    2 Posts
    4k Views
    T
    Just replying to an old topic as it might help someone in the future - I was just struggling with the same error. Turns out you need to be editing a python file on the device itself to be able to run it. Under the 'main.py' tab at the top right of your screen shot, you can see that this file is located in folder 'm5stack ...'. This should show 'COM8 > flash > main.py' or similar if you are editing the version on the device (just click on the 'main.py' under your highlit 'COM8' on the bottom left to select the file on the device before trying to run rather than the file on your local PC).
  • Wiring for M5Stack Core2 and 4 channel relay module

    2
    0 Votes
    2 Posts
    2k Views
    felmueF
    Hello @seguidor777 the M5Core2 talks to the 4 channel relay module via I2C which only requires 2 wires. Check out the documentation. Also have a look at the example. Thanks Felix
  • Driving dozens of sensors and relays on Core2 plus a temperature sensor

    2
    0 Votes
    2 Posts
    3k Views
    F
    for benefit of community, I could solve myself: changed Onewire.h line 134 from addr to addr2. And it works 🙂