Here's a test run, the first block of temps is read all sensors the old way three times, the second block is the new way. The number after is the time in ms to complete all three sets of reads.
Code: Select all
MicroPython v1.5-94-gae58035 on 2015-11-07; WiPy with CC3200
Type "help()" for more information.
>>> import FDS1820
>>> FDS1820.tst()
devices: [bytearray(b'(\xff\x13Ns\x15\x03u'), bytearray(b'(\xff\xaa`s\x15\x03\xac'), bytearray(b'(\xff\x00\xcbr\x15\x02\xea')]
temperatures: [1981, 1975, 1993]
temperatures: [1981, 1975, 1993]
temperatures: [1981, 1975, 1993]
6094
temperatures: [1981, 1975, 1993]
temperatures: [1981, 1975, 1993]
temperatures: [1981, 1975, 1993]
2332
>>> FDS1820.tst()
devices: [bytearray(b'(\xff\xcfur\x15\x02#'), bytearray(b'(\xff\x13Ns\x15\x03u'), bytearray(b'(\xff\xaa`s\x15\x03\xac'), bytearray(b'(\xff\xf8\xa6r\x15\x02\x7f'), bytearray(b'(\xff\x00\xcbr\x15\x02\xea')]
temperatures: [2031, 1987, 1981, 2093, 2000]
temperatures: [2031, 1987, 1981, 2100, 2000]
temperatures: [2031, 1987, 1981, 2100, 2000]
10133
temperatures: [2031, 1987, 1981, 2100, 2000]
temperatures: [2031, 1993, 1981, 2100, 2000]
temperatures: [2031, 1993, 1981, 2100, 2006]
2619
First commit of ugly code here https://github.com/scudderfish/SFL525R/ ... FDS1820.py
Regards,
David