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

    Porting StepMotor module example ?

    Modules
    2
    5
    716
    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.
    • ChSimonC
      ChSimon
      last edited by

      Hi everyone,

      I am currently trying to use a StepMotor Module (13.2, version 1.0), with a Core2.
      The example StepmotorPulse_M039.ino includes some libraries:
      #include "M5Stack.h"
      #include "Module_Stepmotor.h"
      #include "freertos/FreeRTOS.h"
      #include "freertos/task.h"

      And all seem up to date.
      However, compilation fails:

      Compilation error: 'ledcSetup' was not declared in this scope

      I read in many discussions that M5Stack.h should be replacer by M5Unified.h and FastLED.h

      Is the example broken by new libraries ? Shall I downgrade the libraries ? Or change the example ?

      Thanks in advance for any advice, link or reading.

      teastainT 1 Reply Last reply Reply Quote 0
      • teastainT
        teastain @ChSimon
        last edited by

        @ChSimon
        esp32 by Espressif ver 3 brought changes and headaches.
        you can still compile with ver 2.0.17.
        Ver 3 changes are outlined here:
        https://randomnerdtutorials.com/esp32-migrating-version-2-to-3-arduino/
        The third party vendors, such as, but not limited to, M5Stack had to scramble, back peddle if you will.
        I use ver 3.1.0 which is stable for all my projects.
        'ledcSetup' was "deprecated".

        Cheers, Terry!

        100% M5Stack addict with several drawers full of product!

        ChSimonC 1 Reply Last reply Reply Quote 0
        • ChSimonC
          ChSimon @teastain
          last edited by

          @teastain Huge thanks !

          Randomnerdtutorial link is the best Christmas Gift I've received this year !

          Why does not M5Stack update the examples accordingly ? Not enough human resources ?
          This is deeply misleading, is not it ?

          teastainT 1 Reply Last reply Reply Quote 1
          • teastainT
            teastain @ChSimon
            last edited by

            @ChSimon My pleasure!
            M5Stack releases a new gadget or two every week!
            They need to support us Arduino IDE guys and the UIFlow with new drivers (libraries) and examples.
            The esp32S3 variant has been a nightmare for then, apparently.
            The 'esp32 by Espressif' board def, shift to ver3 was seismic.
            This Community website is a resource for them because we find the problems and complain. then their engineers hunt it down and correct it.
            The new Unified library helps a lot.
            We have a DIY hobby!
            Cheers, Terry.

            Cheers, Terry!

            100% M5Stack addict with several drawers full of product!

            ChSimonC 1 Reply Last reply Reply Quote 0
            • ChSimonC
              ChSimon @teastain
              last edited by

              Hi everyone,

              In case somebody would be interested, here is the modified version of the example code StepmotorPulse_M039 working with M5Unified.h and Espressif API updates.

              Tested with an old M5Basic.
              In retrospect, it's relatively obvious.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post