Code Monkey home page Code Monkey logo

m5stack-idf's Introduction

To use as a M5Stack component of ESP-IDF

  • Download and install esp-idf
  • Create template idf project
    git clone https://github.com/m5stack/M5Stack-IDF.git
  • make menuconfig has some Arduino options
    • "Autostart Arduino setup and loop on boot"
      • If you enable this options, your main.cpp should be formated like any other sketch

        //file: main.cpp
        #include <M5Stack.h>
        
        void setup(){
        
          M5.begin();
          M5.Lcd.printf("hello world");
        }
        
        void loop() {
        
          M5.update();
        }
        
      • Else you need to implement app_main() and call initArduino(); in it.

        Keep in mind that setup() and loop() will not be called in this case. If you plan to base your code on examples provided in esp-idf, please make sure move the app_main() function in main.cpp from the files in the example.

        //file: main.cpp
        #include <M5Stack.h>
        
        extern "C" void app_main()
        {
            initArduino();
            M5.begin();
            M5.Lcd.println("hello world!");
        }
        
    • "Disable mutex locks for HAL"
      • If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core
    • "Autoconnect WiFi on boot"
      • If enabled, WiFi will start with the last known configuration
      • Else it will wait for WiFi.begin
  • make flash monitor will build, upload and open serial monitor to your board

m5stack-idf's People

Contributors

0x1abin avatar m5stackjimmylai avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.