Particle Argon running OS 1.4.2, with AM2302 (Device “A”) connected to D4 pin, and DHT22 (Device “B”) connected to D5 pin. An oscilloscope was used to verify proper signal levels and timing from DHT devices to Argon. Library to support DHT devices was imported from eliteio/PietteTech_DHT. The example program “DHT_2sensor” was compiled within VS code with Particle workbench.
Results: While a 90% valid result may be acceptable (Device “A”), it was concerning that less than 50% valid results for the 2nd (Device “B”). This was from a sample size of 130 continuous samples.
More analysis was accomplished measuring the timing in and around the interrupt routine using an Argon OS 1.4.2. Using pinSetFast(D7) upon entry to the isrCallback and several pinResetFast(D7) placed at the potential exit points of the ISR and an oscilloscope, the measured time from falling edge to beginning of the ISR was between 8us to 44us. The time within the ISR was approx. 12us.
Additionally, acquiring both devices simultaneously produced valid results less than 50% of the time. However, acquiring in a sequential fashion (i.e. start device B after device A has returned), produced valid results better than 96% of the time.
Conclusion: Argon, and maybe all Mesh Particle devices, can’t be used to measure kHz speed signals (8 - 14 kHz, “1” pulse width and “0” pulse width respectively).due to the high latency of entering the interrupt service routine.