Avatar for TomWS

TomWS

Member since Mar 2019 • Last active Mar 2019
  • 6 conversations
  • 30 comments

Most recent activity

  • in Interfacing
    Avatar for TomWS

    I realized last night that I might have left the wrong impression with my previous comment. I'm merely shelving the Espruino work for the time being so I can do some other stuff.

    I'll be baaack! :-)

  • in Interfacing
    Avatar for TomWS

    Something else completely.

  • in Interfacing
    Avatar for TomWS

    Just to close this out, I'm moving on to something else and won't be working on this for the foreseeable future.
    Thanks for your help.

  • in Interfacing
    Avatar for TomWS

    I think I've got everything modified in LIS3MDL (except updating the documentation) but it is unclear to me how LIS2DH12.readXYZ is used. Can you give me an example?

  • in Interfacing
    Avatar for TomWS

    Interesting approach on the LIS2DH12. I like the fact that you can pass configuration settings in the options 'option'. It can eliminate a lot of superfluous setup functions.

    Given this, if using SPI then cs could be a required option and the same connect function used - it's easy enough to distinguish whether the interface is SPI or I2C within the connect function. And, as you say, addr could be an option as you have it in LIS2DH12.

    I'll mess around with it and see what I can come up with...

  • in Interfacing
    Avatar for TomWS

    Hmmmm, how very javascript-ish!
    I'll look into this. The callback feature is nice and efficient! I may want to expand on that for continuous reads, but I have some learning to do before I get into that.

    Thanks for the feedback.

  • in Interfacing
    Avatar for TomWS

    My board has an LIS3MDL magnetometer on it, but uses SPI, rather than the I2C interface used in the existing LIS3MDL device code.

    Looking at the code, the IO interface is pretty well isolated from the LIS3MDL specific methods so I'm inclined to simply update that module so that, rather than requiring an I2C interface, the connect code accepts either an I2C or SPI instance and the read and write code simply tests for which interface is being used and calls the appropriate lower level IO function.

    The alternative is to create a redundant device called something like LIS3MDL-S or something, but I think that's unnecessary since the first approach is not unwieldy.

    Thoughts?

  • in General
    Avatar for TomWS

    You're welcome!

    I forgot to mention that your previous update to fattime.c, etc, was ok. It was my 'non-clean' build that kept it from updating (due the .h file that was also changed). The additional setting modification time during create (see #4) was not necessary UNLESS you did a fs.statSync immediately after opening a newly created file. Once the file was closed, the mod dates were updated properly.

Actions