Closed amotl closed 4 years ago
The write timing is less critical.
Actually, the sleep_us(60) takes about 74us, And what should be the 1 us pulse lasts 8 us. But the ds18b20 does not care so much. The write low time is 1-15µs, the write high time is 60-120µs. So it is all within the bounds.
Hi again,
when looking at the code within the
write_bit
methodhttps://github.com/robert-hh/Onewire_DS18X20/blob/a51a423e635f32c6885da511d615f7e636ccfda9/onewire.py#L81-L83
we are thinking about whether it makes sense to handle it like within
read_bit
https://github.com/robert-hh/Onewire_DS18X20/blob/a51a423e635f32c6885da511d615f7e636ccfda9/onewire.py#L55-L57
This PR also removes the
sleep_us(1)
within that method. https://github.com/pycom/pycom-libraries/pull/51/filesCheers, Andreas.