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

    Porting StepMotor module example ?

    Scheduled Pinned Locked Moved Modules
    5 Posts 2 Posters 3.1k Views
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              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

              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