🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to test we compile a M5Stack ?

    Scheduled Pinned Locked Moved PRODUCTS
    3 Posts 3 Posters 10.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      LaurentG
      last edited by

      On a source file, we have to test if we compile an M5Stack or ESP32LoRa or a ESP8266. Is there a specific variable to test like :
      #ifdef ESP8266

      I know that we can test ESP32 but it's not enought to define the difference berween a ESP32 and a M5Stack...

      JJJ 1 Reply Last reply Reply Quote 0
      • JJJ Offline
        JJ @LaurentG
        last edited by

        @laurentg

        Hi, will these work for you ? They are specifically used in code for the M5Stack.

        #include <M5Stack.h>
        M5.begin();

        1 Reply Last reply Reply Quote 0
        • reaper7R Offline
          reaper7
          last edited by reaper7

          try:

          #ifdef ARDUINO_M5Stack-Core-ESP32
          

          as is declared in arduino boards:
          https://github.com/espressif/arduino-esp32/blob/master/boards.txt#L1169
          but this is temporary solution because hyphens are not valid for arduino.

          We waiting for some changes...
          "issue" is added: https://github.com/m5stack/M5Stack/issues/41

          MY GITHUB: https://github.com/reaper7/

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post