You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi - thanks for letting me know... so it just crashes on the 'compass' call?

    Does it return after a few seconds? It could be it's having some difficulty communicating over I2C, but it should time out.

    The micro:bit is a lot slower than normal Espruinos, so it could be that the timeouts are way longer than they should be and it could take up to a minute to return.

    It does seem like there's an issue with the code that reads from the compass though, even if it's only that it's giving dodgy values. I'll file an issue for it, but I'm a bit busy this week.

    If you desperately need it, you should be able to get the compass values directly:

    var d = I2C1.readFrom(0x0E,6);
    // then data is in 6 bytes in d (i think)

Avatar for Gordon @Gordon started