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

    LEGO+ Issue

    FAQS
    4
    10
    16.4k
    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.
    • A
      AndroidSpa
      last edited by

      Is there any code available for the LEGO+ board and the arduino ide?
      I have looked in the github and tried to google online but there are only examples for Uiflow and the "firmware" for the 328p is not very useful.
      Please help!!

      1 Reply Last reply Reply Quote 1
      • ajb2k3A
        ajb2k3
        last edited by

        What exactly are you looking for?
        I have done some work with it.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • lukasmaximusL
          lukasmaximus
          last edited by

          Hi @AndroidSpa could you give us some more info about your project so we can better help you the github repository with code for lego+ is here https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/LEGO_PLUS/UIFlow

          1 Reply Last reply Reply Quote 0
          • A
            AndroidSpa
            last edited by

            I am planning to control a 2-wheel robot by using the M5-stack Gray version and the LEGO+ module.

            I want to program everything by using the arduino IDE (not the UIflow). From what I understand looking at the schematics of the LEGO+ https://docs.m5stack.com/assets/img/product_pics/module/lego_plus_sch.png

            The ATMEGA328 is connected to the encoder signals of the motors and to the L293DD, so the code to read the encoders and to drive the motors is preloaded in the firmware of the ATMEGA (I guess that the ATMEGA works as a I2C slave).

            The problem is that there is no information about the I2C commands that the M5Stack (the ESP32) have to send to the ATMEGA to read the encoders' values and to drive the motors

            Thanks in advance for any help that can be provided

            G 1 Reply Last reply Reply Quote 0
            • G
              Gaius @AndroidSpa
              last edited by

              @androidspa
              Very funny, I wanted to do that too :-)
              And I didn't find the I2C commands either.

              Greetings.

              1 Reply Last reply Reply Quote 0
              • ajb2k3A
                ajb2k3
                last edited by

                Here is the source code file for the atmega https://github.com/m5stack/M5-ProductExampleCodes/blob/master/Module/LEGO_PLUS/firmware_328p/m5_lego/src/lego_motor_basic.ino
                There was a card that had the commands on it that came with mine but I have lost the card.

                UIFlow, so easy an adult can learn it!
                If I don't know it, be patient!
                I've ether not learned it or am too drunk to remember it!
                Author of the WIP UIFlow Handbook!
                M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                1 Reply Last reply Reply Quote 0
                • lukasmaximusL
                  lukasmaximus
                  last edited by

                  @ajb2k3 That's weird. I asked around in assembly department and our graphic designer and no one seems to be aware of a card that comes with the lego+. Thanks for sending the link to the source.

                  ajb2k3A 1 Reply Last reply Reply Quote 0
                  • ajb2k3A
                    ajb2k3 @lukasmaximus
                    last edited by

                    @lukasmaximus said in LEGO+ Issue:

                    @ajb2k3 That's weird. I asked around in assembly department and our graphic designer and no one seems to be aware of a card that comes with the lego+. Thanks for sending the link to the source.
                    Okay, I must be going crazy then. I thought the commands were written down someware.

                    UIFlow, so easy an adult can learn it!
                    If I don't know it, be patient!
                    I've ether not learned it or am too drunk to remember it!
                    Author of the WIP UIFlow Handbook!
                    M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                    1 Reply Last reply Reply Quote 0
                    • A
                      AndroidSpa
                      last edited by

                      I think I may have found a solution for controlling the LEGO+ module.

                      It turns out that when you install the arduino library for the M5Stack, there is an example to interface the LEGO module. It is located in File>Examples>M5Stack>Modules>LEGO_PLUS>LEGO_test

                      From that example code the I2C commands can be figured out. I hope this information is useful to anybody facing the same issue as me

                      ajb2k3A 1 Reply Last reply Reply Quote 1
                      • ajb2k3A
                        ajb2k3 @AndroidSpa
                        last edited by

                        @androidspa said in LEGO+ Issue:

                        I think I may have found a solution for controlling the LEGO+ module.

                        It turns out that when you install the arduino library for the M5Stack, there is an example to interface the LEGO module. It is located in File>Examples>M5Stack>Modules>LEGO_PLUS>LEGO_test

                        From that example code the I2C commands can be figured out. I hope this information is useful to anybody facing the same issue as me

                        UIFlow, so easy an adult can learn it!
                        If I don't know it, be patient!
                        I've ether not learned it or am too drunk to remember it!
                        Author of the WIP UIFlow Handbook!
                        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

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