You are reading a single comment by @HaraldK and its replies. Click here to read the full conversation.
  • Hi,

    I got a M5Stack thing with several I2C sensors. All work with Espruino. Awesome!
    I got a LEGO+ module (AKA DC Motor) which can control Lego motors from the Mindstorm series. It works using M5Stack's microPython. Capabilities are limited to turn motor to speed -255..255 and read the encoder absolute values. The actual logic is handled by a Atmel Mega328. Here an example how you talk to it via Arduino code.

    It behaves as a I2C slave device (addr 0x56), but I cannot make it work using Espruino.

    M5Stack has has several similar modules with on-board controller and I assume the way to talk to them is similar.
    Does anyone have an example of talking to those M5Stack modules which are I2C slave devices? Any of them?

    This code does not work:

    I2C1.writeTo(0x56, 0, 100, 0, 2);
    

    which is (supposedly) matching line 43 of the LEGO_PLUS.ino sample code.
    What am I missing?

About

Avatar for HaraldK @HaraldK started