LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Different sampling rates?

Hi there,

so I have multiple things which I am trying to make function in the same sketch: the first is a sketch containing 3 dht sensors, which require a delay between sampling to avoid interference or else they do not work. The second has a pulse timer for a simple 1/0 input which requires continuous sampling. How can I run both of these sensors at the same time? as it stands, I can get either one working in a sketch or the other. Is there a way to structure the dht's to put them in a closed loop, while maintaining other sensors' continuity?

Thanks!

Download All
0 Kudos
Message 1 of 4
(3,451 Views)

I still am having no luck with this. Can anyone offer any hints?

0 Kudos
Message 2 of 4
(3,108 Views)

solved!

just needed a seperate while loop

0 Kudos
Message 3 of 4
(3,108 Views)

Just as an FYI, you shouldn't branch the reference wire as explained here (it's the same reasoning for both LIFA and LINX).  If you absolutely need to so it that way, you could implement semaphores to prevent the race condition created by branching the resource wire.

0 Kudos
Message 4 of 4
(3,108 Views)