[solved] Onewire DS18X20 reading not stable with LoPy4 (no problem with LoPy)

  • @livius @livius You could use any newer device too, like a GPy, FiPy, WiPy3 or ESP32 with a WROVER module.

  • @robert-hh
    interesting assumption.

    are you sure that all is same?
    What is your value for external pullup? I always use for DS18X20 external pullup 4.7K.
    And reading is ok also for long cable like 10 meters. But i do not have Lopy4 to test behavior, and can not help more without.

  • @affoltep If all other parameters are the same, like firmware version, that could be caused by the differences in the RAM timing of the two devices. LOPY4 uses psRAM for the heap, which is subject to cache misses. A cache miss causes delay in program execution of about 300 µs.
    Besides that, code on a ESP32 cannot be expected to have a reliable timing in the range <= 1 ms, unless you make it "sticky". That''s only possible for C code.

Log in to reply

Pycom on Twitter