🤖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 ?

    PRODUCTS
    3
    3
    8.9k
    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
      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
        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
          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
          • First post
            Last post