Open jarell-santella opened 1 year ago
@sjpark608 let's make sure we have integration tests for this
@jarell-santella why are we enabling/disabling rtd in the loop?
@sjpark608 I think this can technically happen if we have other channels set to use adc2.
@jarell-santella
@farzadpanahi
in that case, you should use reading = edgepi_adc.single_sample_rtd()
this method instead. read_rtd_temperature
uses a continuous reading delay which is shorter than the single sample delay.
I was able to read without sleep delay, refer to this readme
-------------------------------------------------------------------------------------------------------------------------edit
@jarell-santella I think the idea was to use cont. mode only if there are no other channels set to use adc2. in that case we turn on rtd and leave it on in cont. mode. we don't need to turn it on and off each time.
as soon as a channel is configured to use adc2, then we should switch to single sample mode.
That sleep in line 6 is necessary because the built-in sleep in SDK is not enough. If I remove that
100ms
sleep between setting RTD and reading RTD, the reading will be -259.7402597402597 °C.