LEGO+ Issue
-
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!! -
What exactly are you looking for?
I have done some work with it. -
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
-
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
-
@androidspa
Very funny, I wanted to do that too :-)
And I didn't find the I2C commands either.Greetings.
-
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. -
@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.
-
@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. -
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
-
@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