The Goal of this project is to control your Lego Batmobile (Model 76112) thanks to your M5StickC and its JoyC Hat.
git clone https://github.com/colas-sebastien/M5StickC-JoyC-lego-powerup-batmobile.git
- Install Arduino IDE and follow the official configuration on M5Stack site
- Install the Leoino library from the library manager
- Upload the code on your M5StickC
Unfortunatly M5StickC and Legoino libraries are not fully compatible because of the color definition. So if you want to use color on your Hub or on your stick I recommend to modify the enum
in the Lpf2Hub.h
file in Legoino library. After you can ucomment lines 48 to 56 in the ino file of the project.
typedef enum Color
{
LEGO_BLACK = 0,
LEGO_PINK = 1,
LEGO_PURPLE = 2,
LEGO_BLUE = 3,
LEGO_LIGHTBLUE = 4,
LEGO_CYAN = 5,
LEGO_GREEN = 6,
LEGO_YELLOW = 7,
LEGO_ORANGE = 8,
LEGO_RED = 9,
LEGO_WHITE = 10,
LEGO_NONE = 255
};