• How many samples/second are you trying to get? Puck.js's I2C to the accelerometer should be able to push at least 400kBits/sec I'd have thought.

    Even at 400kHz that's maybe 20,000 6 byte samples/second if you're using I2C half the time.

    Do you have your code online somewhere? I could take a look and see if there seems to be anywhere obvious we could speed things up.

    Right now Espruino's I2C isn't asynchronous, but potentially it would be possible to use it by DMA so you can be reading from the accelerometer at the same time as writing to flash

    However, even if you decided to use software SPI you're still going to be able to get up to 1Mbps out of the sensor, maybe more.

About

Avatar for Gordon @Gordon started