Just do the same as you have done with your text label (Sunny or Shady) but use the image.picture block instead and feed it the correct image?
--
2 sensors are working. so if it is raining the rain sensor will sends data to app and then i want to show the image raining and then when rain sensor stop sending data and no rain and the ldr receives data that it is sunny the raining image will be sunny image.
--
when rain sensor stop sending data and no rain
So the rain sensor will send no data (and therefore have no events trigger?) if there is no rain?
That would call for a Watchdog Timer design, where you keep a TinyDB tag msLastRainDrop with the last
time (in milliseconds from 1970) that the rain sensor event triggered, and a repeating clock
that checks Clock1.Now() in milliseconds against the TinyDB value, to see if enough time has passed
(1 minute = 60000 ms)
since the last raindrop to announce there's no rain.
When a rain drop arrives, set the TinyDB value to Now in milliseconds, and announce it's raining.
The Clock component is in the Sensors drawer.
댓글 없음:
댓글 쓰기