You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • Ok, going back to my original question:

    I've taken the suggestion from @fanoush and just written a short module in javascript for the BMA421 from scratch. All it does it load the binary code to set up the step counter and then reads steps and xyz acceleration. It seems to all work, for not many lines of code, so I'm happy with that as an approach.
    My eventual solution was just to turn the bytes from the config file into a binary file that I upload to Storage. I then read it in chunks (I don't think this really uses memory?) and write each chunk to the sensor. Everything else is very similar to the example code in the ATCWatcH project. The datasheet has several errors / omissions in it, but it helped to get started.
    BMA421 doesn't have twist interrupts, so I will have to check that on an interval if I want to turn on the screen that way.

  • I then read it in chunks (I don't think this really uses memory?) and write each chunk to the sensor.

    file from storage does not take extra memory, the read just gets direct pointer to bufferbacked by the flash storage, so you can get whole file, no need to split into blocks due to memory. not sure how big blocks i2c can write in one call, maybe there is no limit either, so depends what is reasonable for the sensor to receive in one write.

    BTW, maybe you can copy your BMA421 code here or link it, could be helpful for other people in future

About

Avatar for fanoush @fanoush started