• Now I have version with most bugs fixed which passes Closure minification in advanced mode and works after.
    Unfortunately I do not know if it works without minification - it looks like it is too big for my current device (while I am out of home and so can not use some other device).
    After calibration the sensor is more stable and does not report very small distance when in open space. Also you may use some mode setup functions. It is great for me. But I need also GPIO setup to try switching it to trigger mode, when GPIO turns on if object is too close and turns off when it is far again.
    The module is still big enough even after advanced minification - about 7600 bytes. I can load it only in 'Modules uploaded as functions' mode. In normal mode it results to LOW_MEMORY error.
    I have not still fixed I2C address (it is 8 bit in the module and need to be shifted) while it is easy for me, because I think it is up to @Gordon to change it or leave as is for compatibility. While I think now is good time for the change.
    Also I think it may be interesting to have both modules for the complex sensor - old and new one, because they have different areas of usage. Really I have no good idea what to do with that.


    1 Attachment

About

Avatar for SergeP @SergeP started